From 5b166dd93003adb0749002d74109a519f746e204 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 03 八月 2024 16:49:15 +0800
Subject: [PATCH] 2024-08-03
---
src/menu/components/share/actioncomponent/formconfig.jsx | 2720 +++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 2,456 insertions(+), 264 deletions(-)
diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx
index 04804f3..5dc2f82 100644
--- a/src/menu/components/share/actioncomponent/formconfig.jsx
+++ b/src/menu/components/share/actioncomponent/formconfig.jsx
@@ -1,7 +1,5 @@
-import zhCN from '@/locales/zh-CN/model.js'
-import enUS from '@/locales/en-US/model.js'
-
-const Formdict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
+import React from 'react'
+import { btnClasses } from '@/utils/option.js'
/**
* @description 鑾峰彇鎸夐挳琛ㄥ崟閰嶇疆淇℃伅
@@ -9,69 +7,173 @@
* @param {*} functip 鐢熸垚瀛樺偍杩囩▼鎻愮ず
* @param {*} setting 缁勪欢閰嶇疆
* @param {*} usefulFields 瀛樺偍杩囩▼鍙敤鐨勫紑濮嬪瓧娈�
- * @param {*} type 鎸夐挳绫诲瀷锛岀敤浜庡尯鍒嗗彲閫夌殑鎵撳紑鏂瑰紡
*/
-export function getActionForm (card, functip, config, usefulFields, type, menulist = [], modules = []) {
+export function getActionForm (card, functip, config, usefulFields, modules = [], anchors = [], side, position) {
let appType = sessionStorage.getItem('appType')
+ let viewType = sessionStorage.getItem('editMenuType') // 寮圭獥 popview
let setting = config.setting || {}
- let columns = config.columns || []
+ let columns = side === 'sub' && config.subColumns ? config.subColumns : (config.columns || [])
let appMenus = []
+ let menulist = []
+ let type = ''
+ let alltype = config.type + '_' + config.subtype
+
+ columns = columns.map(item => ({
+ value: item.field,
+ text: `${item.label}锛�${item.field}锛塦
+ }))
+
+ if (card.eleType === 'button') {
+ type = 'card'
+ } else if (config.subtype === 'datacard' || config.subtype === 'tablecard' || config.subtype === 'dualdatacard') {
+ type = 'datacard'
+ } else if (config.type === 'line' || config.type === 'bar' || config.type === 'scatter') {
+ type = 'chart'
+ }
+
+ if (card.color && (type !== 'datacard' || appType !== 'mob') && !card.class) {
+ card.class = 'primary'
+ }
+
let opentypes = [
{
value: 'pop',
- text: Formdict['model.form.popform']
+ text: '寮圭獥锛堣〃鍗曪級'
}, {
value: 'prompt',
- text: Formdict['model.form.prompt']
+ text: '鎻愮ず妗�'
}, {
value: 'exec',
- text: Formdict['model.form.exec']
+ text: '鐩存帴鎵ц'
}, {
value: 'excelIn',
- text: Formdict['model.form.excelIn']
+ text: '瀵煎叆Excel'
}, {
value: 'excelOut',
- text: Formdict['model.form.excelOut']
+ text: '瀵煎嚭Excel'
}, {
value: 'popview',
- text: Formdict['model.form.popview']
+ text: '寮圭獥锛堟爣绛撅級'
}, {
value: 'tab',
- text: Formdict['model.form.tab']
+ text: '鏍囩椤�'
}, {
value: 'innerpage',
- text: Formdict['model.form.newpage']
+ text: '鏂伴〉闈�'
}, {
value: 'funcbutton',
- text: Formdict['model.form.funcbutton']
+ text: '鍔熻兘鎸夐挳'
}
]
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
+ }
+
+ let tabs = getTabs(window.GLOB.customMenu.components)
+
+ let linkButtons = []
+ let filterComponent = (components) => {
+ components.forEach(item => {
+ if (item.type === 'tabs') {
+ item.subtabs.forEach(tab => {
+ filterComponent(tab.components)
+ })
+ } else if (item.type === 'group') {
+ filterComponent(item.components)
+ } else {
+ item.action && item.action.forEach(cell => {
+ if (cell.hidden === 'true' || cell.uuid === card.uuid) return
+ if (!['exec', 'prompt', 'pop'].includes(cell.OpenType)) return
+
+ linkButtons.push({
+ value: cell.uuid,
+ label: cell.label + '锛�' + item.name + '锛�'
+ })
+ })
+
+ if (item.type === 'card' && item.subcards) {
+ item.subcards.forEach(m => {
+ if ((item.subtype === 'datacard' || item.subtype === 'dualdatacard') && m.$cardType !== 'extendCard') return
+ m.elements.forEach(cell => {
+ if (cell.eleType !== 'button' || cell.hidden === 'true' || cell.uuid === card.uuid) return
+ if (!['exec', 'prompt', 'pop'].includes(cell.OpenType)) return
+
+ linkButtons.push({
+ value: cell.uuid,
+ label: cell.label + '锛�' + item.name + '锛�'
+ })
+ })
+ })
+ } else if (item.type === 'balcony') {
+ item.elements.forEach(cell => {
+ if (cell.eleType !== 'button' || cell.hidden === 'true' || cell.uuid === card.uuid) return
+ if (!['exec', 'prompt', 'pop'].includes(cell.OpenType)) return
+
+ linkButtons.push({
+ value: cell.uuid,
+ label: cell.label + '锛�' + item.name + '锛�'
+ })
+ })
+ } else if (item.type === 'form') {
+ item.subcards.forEach(group => {
+ if(group.uuid === card.uuid) return
+
+ if (item.subcards.length > 1) {
+ linkButtons.push({
+ value: group.uuid,
+ label: group.subButton.label + '锛�' + item.name + '-' + group.setting.title + '锛�'
+ })
+ } else {
+ linkButtons.push({
+ value: group.uuid,
+ label: group.subButton.label + '锛�' + item.name + '锛�'
+ })
+ }
+ })
+ }
+ }
})
}
- let tabs = getTabs(JSON.parse(JSON.stringify(modules)))
+ filterComponent(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: Formdict['header.form.func.changeuser'] },
{ value: 'print', text: '鏍囩鎵撳嵃' },
+ { value: 'refund', text: '閫�娆�' },
{ value: 'closetab', text: '鏍囩鍏抽棴' },
+ { value: 'expPdf', text: '瀵煎嚭PDF' },
+ { value: 'shareLink', text: '鍒嗕韩閾炬帴' },
+ { value: 'megvii', text: '鏃疯闈㈡澘鏈�' },
+ { value: 'filezip', text: '鏂囦欢鍘嬬缉鍖�' },
]
if (isApp) {
@@ -85,102 +187,279 @@
} else {
appMenus = []
}
-
- if (appType === 'mob') {
- opentypes = opentypes.filter(item => ['pop', 'prompt', 'exec', 'innerpage', 'funcbutton'].includes(item.value))
- funTypes = [
- { value: 'mkBinding', text: '寮�閫氭壂鐮佺櫥褰�' },
- { value: 'mkUnBinding', text: '鐢ㄦ埛瑙g粦' },
- { value: 'reAuth', text: '閲嶆柊鎺堟潈' },
- { value: 'goBack', text: '杩斿洖' },
- ]
- pageTemps = [
- { value: 'linkpage', text: '鍏宠仈鑿滃崟' },
- // { value: 'pay', text: Formdict['model.pay'] },
- { value: 'custom', text: '閾炬帴' }
- ]
+ appMenus.push({value: 'goback', text: '杩斿洖锛堜笂涓�椤碉級'})
+ } else {
+ menulist = sessionStorage.getItem('fstMenuList')
+ if (menulist) {
+ try {
+ menulist = JSON.parse(menulist)
+ } catch (e) {
+ menulist = []
+ }
} else {
- pageTemps = [
- { value: 'linkpage', text: '鍏宠仈鑿滃崟' },
- { value: 'billprint', text: '鍗曟嵁鎵撳嵃' },
- { value: 'pay', text: Formdict['model.pay'] },
- { value: 'custom', text: '閾炬帴' }
- ]
- funTypes = [
- { value: 'changeuser', text: Formdict['header.form.func.changeuser'] },
- ]
- opentypes = opentypes.filter(item => item.value !== 'tab')
+ menulist = []
}
+ }
+ if (appType === 'mob') {
+ opentypes = opentypes.filter(item => ['pop', 'prompt', 'exec', 'excelOut', 'popview', 'innerpage', 'funcbutton'].includes(item.value))
+ funTypes = [
+ { value: 'print', text: '鏍囩鎵撳嵃' },
+ { value: 'scan', text: '鎵爜' },
+ { value: 'pay', text: '鏀粯' },
+ { value: 'refund', text: '閫�娆�' },
+ { value: 'resetPwd', text: '淇敼瀵嗙爜'},
+ { value: 'mkBinding', text: '寮�閫氭壂鐮佺櫥褰�' },
+ { value: 'mkUnBinding', text: '鐢ㄦ埛瑙g粦' },
+ { value: 'mkUnsubscribe', text: '娉ㄩ攢璐︽埛' },
+ { value: 'reAuth', text: '鍒囨崲绯荤粺锛堟竻绌虹紦瀛�-灏忕▼搴忥級' },
+ { value: 'clearCache', text: '娓呯┖鏈湴閰嶇疆' },
+ { value: 'copyurl', text: '澶嶅埗閾炬帴鍦板潃' },
+ { value: 'expPdf', text: '瀵煎嚭PDF' },
+ { value: 'shareLink', text: '鍒嗕韩閾炬帴' },
+ { value: 'openLocation', text: '鎵撳紑鍦板浘'},
+ { value: 'logout', text: '閫�鍑�' },
+ { value: 'goBack', text: '杩斿洖' },
+ ]
+ pageTemps = [
+ { value: 'linkpage', text: '鍏宠仈鑿滃崟' },
+ { value: 'custom', text: '閾炬帴' }
+ ]
+ } else if (appType === 'pc') {
+ opentypes = opentypes.filter(item => item.value !== 'tab')
+ funTypes = [
+ { value: 'print', text: '鏍囩鎵撳嵃' },
+ { value: 'refund', text: '閫�娆�' },
+ ]
+ pageTemps = [
+ { value: 'linkpage', text: '鍏宠仈鑿滃崟' },
+ { value: 'billprint', text: '鍗曟嵁鎵撳嵃' },
+ { value: 'pay', text: '鏀粯' },
+ { value: 'custom', text: '閾炬帴' }
+ ]
+ } else {
+ if (card.pageTemplate === 'print') { // 鍘熺被鍨嬫敮鎸�
+ pageTemps.unshift({ value: 'print', text: '鏍囩鎵撳嵃妯℃澘' })
+ } else if (card.pageTemplate === 'billprintTemp') { // 鍘熺被鍨嬫敮鎸�
+ pageTemps.unshift({ value: 'billprintTemp', text: '鍗曟嵁鎵撳嵃妯℃澘' })
+ }
+ }
+
+ if (card.$fixed) {
+ opentypes = opentypes.filter(item => item.value === card.OpenType)
+ }
+
+ if (card.funcType === 'changeuser') { // 鍘熺被鍨嬫敮鎸�
+ funTypes.unshift({ value: 'changeuser', text: '鍒囨崲鐢ㄦ埛' })
+ }
+
+ if (config.subtype === 'editable') { // 缂栬緫琛ㄧ殑娣诲姞銆佸垹闄�
+ funTypes.push(
+ { value: 'addline', text: '澧炲姞琛岋紙缂栬緫琛級' },
+ { value: 'delline', text: '鍒犻櫎琛岋紙缂栬緫琛級' }
+ )
+ } else if (card.funcType === 'addline' || card.funcType === 'delline') {
+ card.funcType = ''
}
if (type === 'chart' && appType !== 'mob') {
opentypes = opentypes.filter(item => item.value === 'excelIn' || item.value === 'excelOut')
+
+ if (card.OpenType !== 'excelIn' && card.OpenType !== 'excelOut') { // 鎷栨嫿娣诲姞绫诲瀷杞崲
+ card.OpenType = 'excelOut'
+ }
}
let refresh = []
- if (sessionStorage.getItem('editMenuType') === 'popview') { // 寮圭獥鏍囩
- opentypes = opentypes.filter(item => item.value !== 'popview' && item.value !== 'funcbutton')
+ if (viewType === 'popview') { // 寮圭獥鏍囩
+ opentypes = opentypes.filter(item => item.value !== 'popview')
+
+ funTypes = funTypes.filter(item => item.value !== 'print')
+
refresh.push({
- value: 'popclose',
- text: '鏍囩鍒锋柊'
+ value: 'closepoptab', // 鍏抽棴寮圭獥鏍囩
+ text: '鍏抽棴寮圭獥'
})
+ refresh.push({
+ value: 'popclose', // 鎵ц寮圭獥鍏抽棴鏃剁殑鍒锋柊
+ text: '鍒锋柊婧愮粍浠�'
+ })
+ }
+
+ if (type === 'card') {
+ opentypes.push({
+ value: 'form',
+ text: '琛ㄥ崟'
+ })
+ } else if (card.OpenType === 'form') { // 鎷栨嫿娣诲姞绫诲瀷杞崲
+ card.OpenType = 'pop'
+ }
+
+ if (!card.control && card.controlField) {
+ card.control = 'disabled'
+ }
+ if (appType === 'mob' && card.control === 'parent') {
+ card.control = ''
+ }
+
+ if (card.execSuccess === 'goback') {
+ card.openmenu = 'goback'
+ card.execSuccess = 'never'
+ }
+
+ let closetab = []
+ if (!appType && viewType !== 'popview') {
+ closetab = [{
+ value: 'closetab',
+ text: '鍏抽棴鏍囩'
+ }]
+ }
+
+ let formTypes = []
+ if (appType === 'mob') {
+ formTypes = [{
+ value: 'scan',
+ text: '鎵弿'
+ }]
+ } else if (card.formType === 'scan') {
+ card.formType = 'switch'
+ }
+
+ let width = card.width || (card.width === 0 ? 0 : 12)
+ if (card.width && /x/.test(card.width)) {
+ width = +width.replace(/x/, '.5')
+ }
+
+ let extraParam = []
+ if (card.recordUser === 'true') {
+ extraParam.push('recordUser')
+ }
+ if (card.dataM === 'true') {
+ extraParam.push('dataM')
+ }
+
+ let apps = []
+ let merchs = []
+ if (!appType) {
+ if (typeof(card.openmenu) === 'string') {
+ card.openmenu = []
+ }
+
+ if (window.GLOB.WXApps) {
+ window.GLOB.WXApps.forEach(item => {
+ if (item.appType === 'merchant') {
+ merchs.push({value: item.appId, text: item.appName})
+ } else {
+ apps.push({value: item.appId, text: item.appName})
+ }
+ })
+ }
+ } else {
+ if (typeof(card.openmenu) !== 'string') {
+ card.openmenu = ''
+ }
}
let forms = [
{
type: 'select',
key: 'OpenType',
- label: Formdict['header.form.openType'],
+ label: '鎸夐挳绫诲瀷',
initVal: card.OpenType,
required: true,
options: opentypes
- },
- {
- type: 'select',
- key: 'funcType',
- label: Formdict['header.form.funcType'],
- initVal: card.funcType || '',
- required: true,
- options: funTypes
- },
- {
- type: 'select',
- key: 'execMode',
- label: Formdict['model.form.execMode'],
- initVal: card.execMode || 'exec',
- required: true,
- options: [{
- value: 'exec',
- text: Formdict['model.form.exec']
- }, {
- value: 'prompt',
- text: Formdict['model.form.prompt']
- }, {
- value: 'pop',
- text: Formdict['model.form.popform']
- }]
- },
- {
- type: 'radio',
- key: 'intertype',
- label: Formdict['header.form.intertype'],
- initVal: card.intertype || 'system',
- required: true,
- options: []
},
{
type: 'text',
key: 'label',
label: '鎸夐挳鍚嶇О',
initVal: card.label,
+ tooltip: card.uuid ? '鎸夐挳ID锛�' + card.uuid : '',
required: true,
- readonly: false
},
+ {
+ type: 'select',
+ key: 'funcType',
+ label: '鍔熻兘绫诲瀷',
+ initVal: card.funcType || '',
+ required: true,
+ options: funTypes
+ },
+ {
+ type: 'radio',
+ key: 'subFunc',
+ label: '鎺ュ彛鍚嶇О',
+ initVal: card.subFunc || 'addUser',
+ required: true,
+ options: [
+ { value: 'addUser', text: '娣诲姞鐢ㄦ埛' },
+ ]
+ },
+ {
+ type: formTypes.length ? 'select' : 'radio',
+ key: 'formType',
+ label: '琛ㄥ崟绫诲瀷',
+ initVal: card.formType || 'switch',
+ required: true,
+ options: [{
+ value: 'switch',
+ text: '寮�鍏�'
+ }, {
+ value: 'radio',
+ text: '鍕鹃�夋'
+ }, {
+ value: 'counter',
+ text: '璁℃暟鍣�'
+ }, {
+ value: 'count_line',
+ text: '璁℃暟鍣�(鏈湴)'
+ },
+ ...formTypes]
+ },
+ {
+ type: 'select',
+ key: 'execMode',
+ label: '鎵ц鏂瑰紡',
+ initVal: card.execMode || 'exec',
+ required: true,
+ options: [{
+ value: 'exec',
+ text: '鐩存帴鎵ц'
+ }, {
+ value: 'prompt',
+ text: '鎻愮ず妗�'
+ }, {
+ value: 'pop',
+ text: '寮圭獥锛堣〃鍗曪級'
+ }]
+ },
+ {
+ type: 'radio',
+ key: 'intertype',
+ label: '鎺ュ彛绫诲瀷',
+ initVal: card.intertype || 'system',
+ required: true,
+ options: []
+ },
+ // {
+ // type: 'checkbox',
+ // key: 'payType',
+ // label: '鏀粯鏂瑰紡',
+ // initVal: card.payType || [],
+ // required: true,
+ // options: [{
+ // value: 'wxpay',
+ // text: '寰俊'
+ // // }, {
+ // // value: 'alipay',
+ // // text: '鏀粯瀹�'
+ // }]
+ // },
{
type: 'radio',
key: 'procMode',
label: '鍙傛暟澶勭悊',
- initVal: card.procMode || 'system',
+ initVal: card.procMode || (card.innerFunc ? 'inner' : 'system'),
+ tooltip: '褰撹繑鍥炲�煎瓨鍦� mk_ex_invoke 涓斿�间负 false 鏃讹紝涓嶄細璋冪敤澶栭儴鎺ュ彛锛涘綋杩斿洖鍊煎瓨鍦� mk_ex_data 鏃讹紝灏嗕互姝や负鍙傛暟鍒嗘壒璇锋眰鑷畾涔夋帴鍙c�傛敞锛氬綋閫夆�滄棤鈥濇椂锛屾寜閽�夎鏃朵細浼犻�掍富閿紝瀛樺湪琛ㄥ崟鏃朵細浼犻�掕〃鍗曞瓧娈碉紝瀛樺湪BID鏃朵細浼燘ID瀛楁銆�',
required: true,
options: [{
value: 'system',
@@ -188,12 +467,15 @@
}, {
value: 'inner',
text: '鍐呴儴鍑芥暟'
+ }, {
+ value: 'none',
+ text: '鏃�'
}]
},
{
type: 'radio',
key: 'sqlType',
- label: Formdict['header.form.action.type'],
+ label: '鎿嶄綔绫诲瀷',
initVal: card.sqlType || '',
required: true,
options: []
@@ -201,66 +483,153 @@
{
type: 'text',
key: 'sql',
- label: Formdict['model.form.tablename'],
+ label: '琛ㄥ悕',
initVal: card.sql || setting.tableName || '',
required: true
},
{
type: 'text',
- key: 'innerFunc',
- label: Formdict['header.form.innerFunc'],
- initVal: card.innerFunc || '',
- tooltip: functip,
- fields: usefulFields,
- tooltipClass: 'middle',
+ key: 'urlkey',
+ label: '鍦板潃瀛楁',
+ initVal: card.urlkey || '',
+ tooltip: '鍥剧墖锛堟枃浠讹級閾炬帴鐨勫瓧娈靛悕銆�',
required: false,
readonly: false
},
{
type: 'select',
key: 'pageTemplate',
- label: Formdict['model.form.newpage.type'],
+ label: '椤甸潰绫诲瀷',
initVal: card.pageTemplate || '',
required: true,
options: pageTemps
},
{
+ type: 'radio',
+ key: 'payMode',
+ label: '鍙傛暟澶勭悊',
+ initVal: card.payMode || 'none',
+ tooltip: '鏀粯锛堟垨閫�娆撅級鍗曞彿鐨勯澶勭悊鏂瑰紡銆�',
+ required: true,
+ options: [{
+ value: 'system',
+ text: '绯荤粺鍑芥暟'
+ }, {
+ value: 'inner',
+ text: '鍐呴儴鍑芥暟'
+ }, {
+ value: 'none',
+ text: '鏃�'
+ }]
+ },
+ {
type: 'select',
+ key: 'wxApp',
+ label: '鍏宠仈搴旂敤',
+ initVal: card.wxApp || '',
+ tooltip: '璇峰叧鑱旀敮浠樼殑鍏紬鍙锋垨灏忕▼搴忋��',
+ required: true,
+ forbid: apps.length === 0,
+ options: apps
+ },
+ {
+ type: 'select',
+ key: 'wxMerch',
+ label: '鍏宠仈鍟嗘埛',
+ initVal: card.wxMerch || '',
+ tooltip: '璇峰叧鑱旀敮浠樼殑鍟嗘埛鍙枫��',
+ required: true,
+ forbid: merchs.length === 0,
+ options: merchs
+ },
+ {
+ type: 'text',
+ key: 'innerFunc',
+ label: '鍐呴儴鍑芥暟',
+ initVal: card.innerFunc || '',
+ tooltip: functip,
+ fields: usefulFields,
+ required: false,
+ },
+ {
+ type: 'printTemps',
+ key: 'printTemp',
+ label: '鎵撳嵃妯℃澘',
+ initVal: card.printTemp || '',
+ help: (record) => {
+ if (record.printTemp) {
+ return <span onClick={() => {
+ sessionStorage.setItem('mk-print-temp', record.printTemp)
+ window.open('#/hs')
+
+ setTimeout(() => {
+ sessionStorage.removeItem('mk-print-temp')
+ }, 50)
+ }} style={{color: '#1890ff', cursor: 'pointer', fontSize: '13px'}}>#鏌ョ湅妯℃澘</span>
+ }
+ return ''
+ },
+ required: true
+ },
+ {
+ type: isApp ? 'select' : 'cascader',
key: 'linkmenu',
label: '鍏宠仈鑿滃崟',
- initVal: card.linkmenu || '',
+ initVal: card.linkmenu || (isApp ? '' : []),
required: true,
- forbid: !isApp,
- options: appMenus
+ extendName: 'MenuNo',
+ options: isApp ? appMenus : (menulist.length ? [...menulist, {value: 'multiMenu', label: '澶氳彍鍗�'}] : [])
+ },
+ {
+ type: 'text',
+ key: 'prefix',
+ label: '鍓嶇紑',
+ initVal: card.prefix || '',
+ tooltip: '鎵爜淇℃伅灏嗕笌鍓嶇紑鎷兼帴鍚庢墽琛屻�傛敞锛氳烦杞彍鍗曢渶浠kbid锛�:鎴�,锛夊紑澶达紝mkbid锛�:鎴�,锛夎烦杞悗灏嗚鍘婚櫎銆備緥濡傦細mkbid:123456 璺宠浆鍚庨〉闈ID涓� 123456銆�',
+ required: false
},
{
type: 'textarea',
key: 'url',
- label: Formdict['model.pageUrl'],
+ label: '椤甸潰鍦板潃',
initVal: card.url || '',
+ tooltip: '鍦ㄩ摼鎺ヤ腑浠***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆�' + (appType === '' ? '鍦板潃鏍煎紡涓猴細******/admin/index.html#/iframe/menuId/@loginuid@ 浼氭墦寮�鏍囩椤点��' : ''),
+ toolWidth: 350,
required: true
+ },
+ {
+ type: 'textarea',
+ key: 'proUrl',
+ label: '姝e紡鍦板潃',
+ initVal: card.proUrl || '',
+ tooltip: '鍦ㄩ摼鎺ヤ腑浠***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆�' + (appType === '' ? '鍦板潃鏍煎紡涓猴細******/admin/index.html#/iframe/menuId/@loginuid@ 浼氭墦寮�鏍囩椤点��' : ''),
+ toolWidth: 350,
+ required: false
},
{
type: 'radio',
key: 'sysInterface',
- label: Formdict['header.form.sysInterface'],
+ label: '绯荤粺绫诲瀷',
initVal: card.sysInterface || 'false',
+ tooltip: '涓氬姟绯荤粺鎸囧悓涓�sso涓嬬殑鍏朵粬涓氬姟绯荤粺锛屽閮ㄧ郴缁熸寚涓嶅悓sso涓嬬殑鍏朵粬涓氬姟绯荤粺銆�',
required: true,
options: [{
- value: 'true',
- text: Formdict['model.true']
- }, {
value: 'false',
- text: Formdict['model.false']
+ text: '涓氬姟'
+ }, {
+ value: 'true',
+ text: '鍗曠偣'
+ }, {
+ value: 'external',
+ text: '澶栭儴'
}]
},
{
type: 'text',
key: 'outerFunc',
- label: Formdict['header.form.outerFunc'],
+ label: '澶栭儴鍑芥暟',
initVal: card.outerFunc || '',
required: false,
- readonly: false
},
{
type: 'textarea',
@@ -279,6 +648,56 @@
required: false
},
{
+ type: 'keyinterface',
+ key: 'exInterface',
+ label: '娴嬭瘯鍦板潃',
+ initVal: card.exInterface || '',
+ required: true
+ },
+ {
+ type: 'keyinterface',
+ key: 'exProInterface',
+ label: '姝e紡鍦板潃',
+ initVal: card.exProInterface || '',
+ tooltip: '姝e紡绯荤粺鎵�浣跨敤鐨勬帴鍙e湴鍧�銆�',
+ required: false
+ },
+ {
+ type: 'radio',
+ key: 'callbackType',
+ label: '鍥炶皟鏂瑰紡',
+ initVal: card.callbackType || (card.callbackFunc ? 'func' : 'none'),
+ tooltip: '浣跨敤鍚庡彴鑴氭湰鎵ц鏃讹紝闇�瑕侀厤鍚堣鍒掍换鍔°��',
+ required: true,
+ options: [{
+ value: 'script',
+ text: '鑷畾涔夎剼鏈�'
+ }, {
+ value: 'default',
+ text: '鍚庡彴鑴氭湰'
+ }, {
+ value: 'func',
+ text: '鍥炶皟鍑芥暟'
+ }, {
+ value: 'none',
+ text: '鏃�'
+ }]
+ },
+ {
+ type: 'text',
+ key: 'cbTable',
+ label: '鍥炶皟琛ㄥ悕',
+ initVal: card.cbTable || '',
+ required: true
+ },
+ {
+ type: 'text',
+ key: 'callbackFunc',
+ label: '鍥炶皟鍑芥暟',
+ initVal: card.callbackFunc || '',
+ required: true
+ },
+ {
type: 'radio',
key: 'method',
label: '璇锋眰鏂瑰紡',
@@ -295,7 +714,7 @@
{
type: 'radio',
key: 'cross',
- label: '璺ㄥ煙璇锋眰',
+ label: '鎺ュ彛璺ㄥ煙',
initVal: card.cross || 'true',
tooltip: '濡傛灉鑷畾涔夋帴鍙d笉鏀寔璺ㄥ煙璇锋眰锛屼細閫氳繃褰撳墠绯荤粺杞彂銆�',
required: false,
@@ -309,108 +728,124 @@
},
{
type: 'radio',
- key: 'callbackType',
- label: '鍥炶皟鏂瑰紡',
- initVal: card.callbackType || 'script',
- tooltip: '浣跨敤鍚庡彴鑴氭湰鎵ц鏃讹紝闇�瑕侀厤鍚堣鍒掍换鍔°��',
- required: true,
+ key: 'stringify',
+ label: '搴忓垪鍖�',
+ initVal: card.stringify || 'text',
+ required: false,
options: [{
- value: 'script',
- text: '鑷畾涔夎剼鏈�'
+ value: 'text',
+ text: 'Text'
}, {
- value: 'default',
- text: '鍚庡彴鑴氭湰'
+ value: 'JSON',
+ text: 'JSON'
+ }, {
+ value: 'qs',
+ text: 'qs'
}]
},
{
type: 'text',
- key: 'cbTable',
- label: '鍥炶皟琛ㄥ悕',
- initVal: card.cbTable || '',
- required: true
+ key: 'ContentType',
+ label: 'Content-Type',
+ initVal: card.ContentType || '',
+ tooltip: '榛樿鍊硷細application/x-www-form-urlencoded;charset=UTF-8',
+ required: false
},
{
type: 'text',
- key: 'callbackFunc',
- label: Formdict['header.form.callbackFunc'],
- initVal: card.callbackFunc || '',
- required: false,
- readonly: false
+ key: 'outerBlacklist',
+ label: '瀛楁榛戝悕鍗�',
+ initVal: card.outerBlacklist || '',
+ tooltip: '涓嶉渶瑕佸洖浼犵殑瀛楁鍙缃瓧娈甸粦鍚嶅崟锛屽涓�艰鐢ㄩ�楀彿鍒嗛殧銆�',
+ required: false
},
{
type: 'select',
key: 'Ot',
- label: Formdict['header.form.isRequired'],
- initVal: card.Ot || 'requiredSgl',
+ label: '琛岃缃�',
+ initVal: card.Ot || (card.sqlType === 'insert' ? 'notRequired' : 'requiredSgl'),
required: true,
- forbid: card.$type === 'tableButton',
options: []
- },
- {
- type: 'cascader',
- key: 'linkmenu',
- label: Formdict['model.form.linkmenu'],
- initVal: card.linkmenu || [],
- required: true,
- forbid: isApp,
- options: menulist
},
{
type: 'select',
key: 'execSuccess',
- label: Formdict['model.form.afterSuccess'],
- initVal: card.execSuccess || 'never',
- tooltip: refresh.length ? '鎵ц鏍囩鍒锋柊鏃讹紝浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '鍒锋柊涓婄骇缁勪欢-琛屾椂锛屼細鍚屾鍒锋柊褰撳墠缁勪欢锛屾敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆�',
+ label: '鎴愬姛鍚�',
+ initVal: card.execSuccess || 'grid',
+ tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳锛堝脊绐楁寜閽級涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻�傚闇�鑱氱劍琛ㄥ崟璇蜂互 @focus:鑱氱劍瀛楁@ 鏍煎紡杩斿洖銆傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級锛汙no_target_menu@ 涓嶆墽琛屾墦寮�鑿滃崟銆�' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂扮粍浠讹紱閫夋嫨鍒锋柊琛� / 缁勪欢鏃讹紝濡傛灉褰撳墠琛屾暟鎹笉瀛樺湪浼氬埛鏂扮粍浠躲�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆傚闇�鑱氱劍琛ㄥ崟璇蜂互 @focus:鑱氱劍瀛楁@ 鏍煎紡杩斿洖銆傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級锛汙no_target_menu@ 涓嶆墽琛屾墦寮�鑿滃崟銆�',
required: true,
options: [{
value: 'never',
- text: Formdict['header.form.refresh.never']
+ text: '涓嶅埛鏂�'
+ }, {
+ value: 'line',
+ text: '鍒锋柊琛�',
+ $disabled: !['table_normaltable', 'table_editable', 'table_basetable', 'card_datacard', 'card_dualdatacard'].includes(alltype)
}, {
value: 'grid',
text: '鍒锋柊褰撳墠缁勪欢'
}, {
+ value: 'line_grid',
+ text: '鍒锋柊琛� / 缁勪欢',
+ $disabled: !['table_normaltable', 'table_editable', 'table_basetable', 'card_datacard', 'card_dualdatacard'].includes(alltype)
+ }, {
value: 'mainline',
text: '鍒锋柊涓婄骇缁勪欢 - 琛�'
}, {
- value: 'closetab',
- text: '鍏抽棴鏍囩'
- },
+ value: 'maingrid',
+ text: '鍒锋柊涓婄骇缁勪欢'
+ },
+ ...closetab,
...refresh]
},
{
type: 'select',
key: 'execError',
- label: Formdict['model.form.afterError'],
+ label: '澶辫触鍚�',
initVal: card.execError || 'never',
- tooltip: refresh.length ? '鎵ц鏍囩鍏抽棴鍒锋柊鏃讹紝浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '鍒锋柊涓婄骇缁勪欢-琛屾椂锛屼細鍚屾鍒锋柊褰撳墠缁勪欢锛屾敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆�',
+ tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳锛堝脊绐楁寜閽級涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級銆�' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂扮粍浠讹紱閫夋嫨鍒锋柊琛� / 缁勪欢鏃讹紝濡傛灉褰撳墠琛屾暟鎹笉瀛樺湪浼氬埛鏂扮粍浠躲�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級銆�',
required: true,
options: [{
value: 'never',
- text: Formdict['header.form.refresh.never']
+ text: '涓嶅埛鏂�'
+ }, {
+ value: 'line',
+ text: '鍒锋柊琛�',
+ $disabled: !['table_normaltable', 'table_editable', 'table_basetable', 'card_datacard', 'card_dualdatacard'].includes(alltype)
}, {
value: 'grid',
text: '鍒锋柊褰撳墠缁勪欢'
}, {
+ value: 'line_grid',
+ text: '鍒锋柊琛� / 缁勪欢',
+ $disabled: !['table_normaltable', 'table_editable', 'table_basetable', 'card_datacard', 'card_dualdatacard'].includes(alltype)
+ }, {
value: 'mainline',
text: '鍒锋柊涓婄骇缁勪欢 - 琛�'
+ }, {
+ value: 'maingrid',
+ text: '鍒锋柊涓婄骇缁勪欢'
},
...refresh]
},
{
type: 'select',
key: 'popClose',
- label: Formdict['header.form.popClose'],
- initVal: card.popClose || 'never',
+ label: '鍏抽棴鍚�',
+ initVal: card.popClose || 'grid',
required: true,
options: [{
value: 'never',
- text: Formdict['header.form.refresh.never']
+ text: '涓嶅埛鏂�'
}, {
value: 'grid',
text: '鍒锋柊褰撳墠缁勪欢'
}, {
value: 'mainline',
text: '鍒锋柊涓婄骇缁勪欢 - 琛�'
+ }, {
+ value: 'maingrid',
+ text: '鍒锋柊涓婄骇缁勪欢'
}]
},
{
@@ -428,15 +863,1497 @@
}]
},
{
+ type: 'select',
+ key: 'nameField',
+ label: '浣嶇疆鍚嶅瓧娈�',
+ initVal: card.nameField || '',
+ tooltip: '鎵撳紑鍦板浘鏃跺彲灞曠ず浣嶇疆鍚嶄笌璇︾粏鍦板潃锛岃缁戝畾鏁版嵁婧愬瓧娈甸泦锛岀粡绾害璇蜂娇鐢╨atitude銆乴ongitude涓旂粡绾害涓嶅彲涓虹┖銆�',
+ required: false,
+ allowClear: true,
+ options: columns
+ },
+ {
+ type: 'select',
+ key: 'addressField',
+ label: '鍦板潃瀛楁',
+ initVal: card.addressField || '',
+ required: false,
+ allowClear: true,
+ options: columns
+ },
+ {
+ type: 'radio',
+ key: 'shortUrl',
+ label: '鐭摼鎺�',
+ initVal: card.shortUrl || 'false',
+ options: [{
+ value: 'false',
+ text: '绂佺敤'
+ }, {
+ value: 'true',
+ text: '鍚敤'
+ }]
+ },
+ {
+ type: 'textarea',
+ key: 'shareUrl',
+ label: '閾炬帴鍦板潃',
+ initVal: card.shareUrl || '',
+ tooltip: '閾炬帴涓鏋滃瓨鍦ˊBID@鎴朄ID@灏嗚嚜鍔ㄦ浛鎹€��',
+ required: true
+ },
+ {
+ type: 'textarea',
+ key: 'shareProUrl',
+ label: '姝e紡閾炬帴',
+ initVal: card.shareProUrl || '',
+ tooltip: '閾炬帴涓鏋滃瓨鍦ˊBID@鎴朄ID@灏嗚嚜鍔ㄦ浛鎹€��',
+ required: false
+ },
+ {
+ type: 'text',
+ key: 'shareTip',
+ label: '鍒嗕韩鎻愮ず',
+ initVal: card.shareTip || '',
+ tooltip: '鍒嗕韩鏃跺鐢ㄦ埛鐨勬彁绀轰俊鎭��',
+ required: false
+ },
+ {
type: 'number',
key: 'width',
- min: 1,
+ min: 0,
max: 24,
- precision: 0,
+ precision: 1,
label: '瀹藉害',
- initVal: card.width || 12,
- tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��',
+ initVal: width,
+ tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼�備负 0 鏃跺搴﹁嚜閫傚簲銆傚彲璁剧疆鍗婂垪鍗�.5銆�',
forbid: type !== 'card',
+ required: true
+ },
+ // {
+ // type: 'radio',
+ // key: 'exportType',
+ // label: '瀵煎嚭鏂瑰紡',
+ // initVal: card.exportType || 'download',
+ // tooltip: '',
+ // required: true,
+ // options: [{
+ // value: 'download',
+ // text: '涓嬭浇鏈湴'
+ // }, {
+ // value: 'link',
+ // text: '鐢熸垚閾炬帴'
+ // }]
+ // },
+ {
+ type: 'radio',
+ key: 'show',
+ label: '鏄剧ず涓�',
+ initVal: card.show || 'button',
+ required: true,
+ forbid: type === 'datacard' && appType === 'mob', // 绉诲姩绔紝婊戝姩鏄剧ず鐨勬寜閽彧鏄剧ず鏂囧瓧
+ options: [{
+ value: 'icon',
+ text: '鍥炬爣'
+ }, {
+ value: 'button',
+ text: '鍥炬爣+鏂囧瓧'
+ }, {
+ value: 'link',
+ text: '鏂囧瓧+鍥炬爣'
+ }]
+ },
+ {
+ type: 'radio',
+ key: 'hover',
+ label: '鎮诞鏁堟灉',
+ initVal: card.hover || '',
+ tooltip: '榧犳爣鎮诞鎸夐挳涓婃柟鏃剁殑棰滆壊鍙樺寲銆�',
+ required: false,
+ forbid: appType === 'mob',
+ options: [{
+ value: '',
+ text: '鏃�'
+ }, {
+ value: 'mk-btn-hover-bg',
+ text: '鑳屾櫙鍙樺寲'
+ }, {
+ value: 'mk-btn-hover-border',
+ text: '杈规鍙樺寲'
+ }]
+ },
+ {
+ type: 'radio',
+ key: 'swipe',
+ label: "婊戝姩鏄剧ず",
+ initVal: card.swipe === 'false' ? 'left' : (card.swipe || 'left'), // 绉诲姩绔粎淇濈暀婊戝姩鏄剧ず鎸夐挳
+ required: false,
+ forbid: (type !== 'datacard' || appType !== 'mob'),
+ options: [{
+ value: 'left',
+ text: '宸︽粦'
+ }, {
+ value: 'right',
+ text: '鍙虫粦'
+ }]
+ },
+ {
+ type: 'icon',
+ key: 'icon',
+ label: '鍥炬爣',
+ initVal: card.icon,
+ required: false,
+ forbid: type === 'datacard' && appType === 'mob', // 绉诲姩绔紝婊戝姩鏄剧ず鐨勬寜閽彧鏄剧ず鏂囧瓧
+ options: []
+ },
+ {
+ type: 'select',
+ key: 'class',
+ label: '棰滆壊',
+ initVal: card.class,
+ tooltip: '姝ら鑹蹭负鎸夐挳鍒濆鍖栭鑹诧紝鍙湪鏍峰紡璋冩暣涓慨鏀广��',
+ required: false,
+ forbid: type === 'datacard' && appType === 'mob', // 绉诲姩绔紝婊戝姩鏄剧ず鐨勬寜閽笉璁剧疆閫氱敤棰滆壊
+ options: btnClasses
+ },
+ {
+ type: 'radio',
+ key: 'color',
+ label: '棰滆壊',
+ initVal: card.color || 'primary',
+ required: false,
+ forbid: (type !== 'datacard' || appType !== 'mob'), // 绉诲姩绔紝婊戝姩鏄剧ず鐨勬寜閽彧鍙缃浐瀹氶鑹�
+ options: [{
+ value: 'primary',
+ text: '钃�'
+ }, {
+ value: 'danger',
+ text: '绾�'
+ }, {
+ value: 'warning',
+ text: '姗�'
+ }, {
+ value: 'success',
+ text: '缁�'
+ }, {
+ value: 'light',
+ text: '鐏�'
+ }, {
+ value: 'system',
+ text: '绯荤粺'
+ }]
+ },
+ {
+ type: 'text',
+ key: 'sheet',
+ label: '琛ㄥ悕',
+ initVal: card.sheet || setting.tableName || '',
+ required: true
+ },
+ {
+ type: 'cascader',
+ key: 'syncComponent',
+ label: '鍒锋柊缁勪欢',
+ initVal: card.syncComponent || [],
+ tooltip: '鎵ц鎴愬姛鍚庯紙鎵ц澶辫触涓斿瓨鍦ㄥ埛鏂伴」銆佸脊绐楁爣绛惧叧闂級锛岄渶瑕佸悓姝ュ埛鏂扮殑缁勪欢銆傛敞锛氶�夋嫨褰撳墠缁勪欢鐨勪笂绾х粍浠舵棤鏁堬紝鍒锋柊涓婄骇缁勪欢璇烽�夋嫨鎴愬姛鍚庘�滃埛鏂颁笂绾х粍浠� - 琛屸�濄��',
+ required: false,
+ options: modules.length ? [...modules, {value: 'multiComponent', label: '澶氱粍浠�'}] : []
+ },
+ {
+ type: 'cascader',
+ key: 'refreshTab',
+ label: '鍒锋柊鑿滃崟',
+ initVal: card.refreshTab || [],
+ tooltip: '鎵ц鎴愬姛鍚庯紙鎴栨墽琛屽け璐ヤ笖瀛樺湪鍒锋柊椤规椂锛夛紝闇�瑕佸悓姝ュ埛鏂扮殑鑿滃崟',
+ required: false,
+ forbid: isApp || viewType === 'popview',
+ options: menulist
+ },
+ {
+ type: !appType ? 'cascader' : 'select',
+ key: 'openmenu',
+ label: '鎵撳紑鑿滃崟',
+ tooltip: '鎵ц鎴愬姛鍚庨渶瑕佹墦寮�鐨勮彍鍗曘��',
+ initVal: card.openmenu || (!appType ? [] : ''),
+ help: appType === 'mob' || appType === 'pc' ? '鍙繑鍥炰笂涓�椤点��' : null,
+ extendName: 'MenuNo',
+ required: false,
+ allowClear: true,
+ options: appType === 'mob' || appType === 'pc' ? appMenus : menulist,
+ forbid: viewType === 'popview'
+ },
+ {
+ type: 'cascader',
+ key: 'switchTab',
+ label: '鍒囨崲鏍囩',
+ initVal: card.switchTab || [],
+ tooltip: '鎵ц鎴愬姛鍚庯紝闇�瑕佸垏鎹㈢殑鏍囩椤点��' + (appType === 'mob' ? '娉細灏忕▼搴忎腑鏃犳晥' : ''),
+ required: false,
+ options: tabs
+ },
+ {
+ type: 'cascader',
+ key: 'anchors',
+ label: '璺宠浆閿氱偣',
+ initVal: card.anchors || [],
+ tooltip: '鎵ц鎴愬姛鍚庯紝闇�瑕佽烦杞殑閿氱偣銆�' + (appType === 'mob' ? '娉細灏忕▼搴忎腑鏃犳晥' : ''),
+ required: false,
+ options: anchors
+ },
+ {
+ type: 'radio',
+ key: 'pagination',
+ label: '鍒嗛〉',
+ initVal: card.pagination || 'false',
+ tooltip: '瀵煎嚭鏁版嵁閲忚緝澶ф椂锛�1000+锛夛紝鍙缃垎椤佃姹傛暟鎹��',
+ required: false,
+ options: [{
+ value: 'true',
+ text: '鏄�'
+ }, {
+ value: 'false',
+ text: '鍚�'
+ }],
+ forbid: appType === 'mob'
+ },
+ {
+ type: 'radio',
+ key: 'search',
+ label: '鎼滅储鏉′欢',
+ initVal: card.search || 'false',
+ required: false,
+ options: [{
+ value: 'true',
+ text: '蹇呭~'
+ }, {
+ value: 'false',
+ text: '闈炲繀濉�'
+ }],
+ forbid: appType === 'mob'
+ },
+ {
+ type: 'select',
+ key: 'preButton',
+ label: '鍓嶇疆鎸夐挳',
+ tooltip: '褰撳墠鎸夐挳鎵ц鍓嶏紝闇�瑕佹墽琛岀殑鎸夐挳銆�',
+ initVal: card.preButton || '',
+ required: false,
+ allowClear: true,
+ options: linkButtons
+ },
+ {
+ type: 'text',
+ key: 'output',
+ label: '杩斿洖鍊�',
+ tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺�傜郴缁熷嚱鏁板彲鎸囧畾杩斿洖鐨勫彉閲忥紙浠绗﹀紑澶达紝杩斿洖id鏃跺彲浣跨敤@id@锛夛紱鑷畾涔夊嚱鏁板彲鎸囧畾杩斿洖瀛楁锛堝id锛夈��',
+ initVal: card.output || '',
+ required: false,
+ // forbid: viewType === 'popview'
+ },
+ {
+ type: 'text',
+ key: 'tipTitle',
+ label: '纭鎻愮ず',
+ initVal: card.tipTitle || '',
+ tooltip: '鎻愮ず妗嗙殑纭鎻愮ず淇℃伅銆�',
+ required: false
+ },
+ {
+ type: 'text',
+ key: 'hoverTitle',
+ label: '鎮诞鎻愮ず',
+ initVal: card.hoverTitle || '',
+ tooltip: '榧犳爣鎮诞鍦ㄦ寜閽笂鏂规椂鐨勬彁绀轰俊鎭��',
+ forbid: appType === 'mob',
+ required: false
+ },
+ {
+ type: 'select',
+ key: 'showName',
+ label: '鏄剧ず鍐呭',
+ initVal: card.showName || '',
+ tooltip: '琛岀骇鎸夐挳鍙�氳繃琛屼俊鎭帶鍒舵寜閽樉绀哄唴瀹广��',
+ required: false,
+ allowClear: true,
+ forbid: position !== 'line',
+ options: columns
+ },
+ {
+ type: 'radio',
+ key: 'open',
+ label: '鎵撳紑鏂瑰紡',
+ initVal: card.open || 'blank',
+ tooltip: '鑿滃崟鎵撳紑鏂瑰紡銆�',
+ required: true,
+ forbid: appType !== 'pc' && appType !== 'mob',
+ options: [
+ {value: 'blank', text: appType !== 'mob' ? '鏂扮獥鍙�' : '鏂伴〉闈�'},
+ {value: 'self', text: appType !== 'mob' ? '褰撳墠绐楀彛' : '褰撳墠椤甸潰'},
+ ]
+ },
+ {
+ type: 'radio',
+ key: 'openTab',
+ label: '鎵撳紑鏂瑰紡',
+ initVal: card.openTab || 'newtab',
+ tooltip: '鑿滃崟鎵撳紑鏂瑰紡銆�',
+ forbid: appType !== '',
+ options: [
+ {value: 'newtab', text: '鏍囩椤�'},
+ // {value: 'newpage', text: '鏂伴〉闈紙鏍囩椤碉級'},
+ {value: 'view', text: '鏂伴〉闈紙鍏ㄥ睆锛�'}
+ ]
+ },
+ {
+ type: 'radio',
+ key: 'display',
+ label: '鏄剧ず鏂瑰紡',
+ initVal: card.display || 'modal',
+ required: true,
+ options: [{
+ value: 'modal',
+ text: '妯℃�佹'
+ }, {
+ value: 'drawer',
+ text: '鎶藉眽'
+ }],
+ forbid: appType === 'mob',
+ },
+ {
+ type: 'radio',
+ key: 'placement',
+ label: '寮瑰嚭鏂瑰悜',
+ initVal: card.placement || 'right',
+ required: false,
+ options: [{
+ value: 'right',
+ text: '鍙充晶'
+ }, {
+ value: 'left',
+ text: '宸︿晶'
+ }, {
+ value: 'top',
+ text: '涓婁晶'
+ }, {
+ value: 'bottom',
+ text: '涓嬩晶'
+ }]
+ },
+ {
+ type: 'number',
+ key: 'ratio',
+ min: 1,
+ max: 3000,
+ precision: 0,
+ label: '姣斾緥',
+ initVal: card.ratio || 85,
+ tooltip: '妯℃�佹鎴栨娊灞夌殑瀹藉害锛屽皬浜�100涓虹獥鍙e搴︼紙鎴栭珮搴︼級鐧惧垎姣旓紝澶т簬100涓哄儚绱犲�笺��',
+ required: true
+ },
+ {
+ type: 'radio',
+ key: 'clickouter',
+ label: '鐐瑰嚮钂欏眰',
+ initVal: card.clickouter || 'unclose',
+ required: false,
+ options: [{
+ value: 'unclose',
+ text: '涓嶅叧闂�'
+ }, {
+ value: 'close',
+ text: '鍏抽棴'
+ }]
+ },
+ {
+ type: 'radio',
+ key: 'popshow',
+ label: '寮圭獥灞曠ず',
+ initVal: card.popshow || 'default',
+ tooltip: '灏忕獥鍙e睍绀哄皢闅愯棌鏍囬鍙婂簳閮ㄦ寜閽��',
+ required: false,
+ options: [{
+ value: 'default',
+ text: '榛樿'
+ }, {
+ value: 'miniview',
+ text: '灏忕獥鍙�'
+ }],
+ forbid: appType === 'mob'
+ },
+ {
+ type: 'radio',
+ key: 'maskStyle',
+ label: '钂欏眰鏍峰紡',
+ initVal: card.maskStyle || 'default',
+ required: false,
+ options: [{
+ value: 'default',
+ text: '榛樿'
+ }, {
+ value: 'transparent',
+ text: '閫忔槑'
+ }],
+ forbid: appType !== 'mob'
+ },
+ {
+ type: 'radio',
+ key: 'closeButton',
+ label: '鍏抽棴鎸夐挳',
+ initVal: card.closeButton || 'false',
+ required: false,
+ options: [{
+ value: 'false',
+ text: '闅愯棌'
+ }, {
+ value: 'true',
+ text: '鏄剧ず'
+ }],
+ forbid: appType !== 'mob'
+ },
+ {
+ type: 'radio',
+ key: 'reload',
+ label: '涓婁竴椤�',
+ initVal: card.reload || 'false',
+ tooltip: '鎴愬姛鍚庢槸鍚﹀埛鏂颁笂椤电殑鏁版嵁銆傛敞锛氬湪鏄庣浜慉PP鎴栧皬绋嬪簭涓湁鏁堛��',
+ forbid: appType !== 'mob',
+ options: [{
+ value: 'false',
+ text: '涓嶅埛鏂�'
+ }, {
+ value: 'true',
+ text: '鍒锋柊'
+ }]
+ },
+ {
+ type: 'radio',
+ key: 'position',
+ label: '鏄剧ず浣嶇疆',
+ initVal: card.position || 'middle',
+ tooltip: '娉細寮圭獥锛堣〃鍗曪級鍦ㄦ樉绀轰负鏄惁妗嗘椂鏈夋晥銆�',
+ required: false,
+ forbid: appType !== 'mob',
+ options: [{
+ value: 'middle',
+ text: '涓儴'
+ }, {
+ value: 'bottom',
+ text: '搴曢儴'
+ }]
+ },
+ {
+ type: 'text',
+ key: 'preFunc',
+ label: '鍓嶇疆鍑芥暟',
+ initVal: card.preFunc || '',
+ tooltip: '鍓嶇疆鍑芥暟鎵ц瀹屾垚鍚庯紝缁撴灉浼氫紶鍏ュ唴閮ㄥ嚱鏁颁腑锛屾鏃跺唴閮ㄥ嚱鏁颁細寮傛鎵ц锛涘綋鍓嶇疆鍑芥暟杩斿洖涓璄rrCode绛変簬-1鏃讹紝灏嗕笉鍐嶆墽琛屽唴閮ㄥ嚱鏁般��',
+ required: false,
+ forbid: appType === 'mob'
+ },
+ {
+ type: 'checkbox',
+ key: 'extraParam',
+ label: '鎵╁睍鍙傛暟',
+ initVal: extraParam,
+ tooltip: '閫夋嫨鈥滅敤鎴蜂俊鎭�濇椂锛屽唴閮ㄥ嚱鏁扮殑浼犲弬浼氬鍔� username 涓� fullname銆傞�夋嫨鈥滄暟鎹鐞嗗憳鈥濇椂锛屽唴閮ㄥ嚱鏁扮殑浼犲弬浼氬鍔� dataM 锛岀鐞嗗憳鍊间负鈥淵鈥濓紝鏅�氱敤鎴蜂负绌恒��',
+ required: false,
+ options: [{
+ value: 'recordUser',
+ text: '鐢ㄦ埛淇℃伅'
+ }, {
+ value: 'dataM',
+ text: '鏁版嵁绠$悊鍛�'
+ }]
+ },
+ {
+ type: 'radio',
+ key: 'control',
+ label: '鎸夐挳鎺у埗',
+ initVal: card.control || (card.controlField ? 'disabled' : ''),
+ tooltip: '褰撻�夋嫨绂佺敤鎴栭殣钘忥紝涓斿瓧娈靛�间笌鎺у埗鍊肩浉绛夋椂锛屾寜閽細闅愯棌鎴栫鐢ㄣ�傚綋閫夋嫨涓婄骇锛屼富琛ㄥ瓧娈靛�间笌鎺у埗鍊肩浉绛夋垨涓昏〃瀛楁鍊间笉瀛樺湪鏃讹紝鎸夐挳浼氶殣钘忋�傛敞锛氬涓�肩敤閫楀彿鍒嗛殧',
+ required: false,
+ options: [{
+ value: '',
+ text: '鏃�'
+ }, {
+ value: 'disabled',
+ text: '绂佺敤'
+ }, {
+ value: 'hidden',
+ text: '闅愯棌'
+ }, {
+ value: 'parent',
+ text: '涓婄骇'
+ }]
+ },
+ {
+ type: 'select',
+ key: 'controlField',
+ label: '鎺у埗瀛楁',
+ initVal: card.controlField || '',
+ required: true,
+ allowClear: true,
+ options: columns
+ },
+ {
+ type: 'text',
+ key: 'controlVal',
+ label: '鎺у埗鍊�',
+ initVal: card.controlVal || '',
+ required: false
+ },
+ {
+ type: 'text',
+ key: 'reason',
+ label: '绂佺敤鍘熷洜',
+ initVal: card.reason || '',
+ required: false
+ },
+ // {
+ // type: 'radio',
+ // key: 'formCache',
+ // label: '琛ㄥ崟缂撳瓨',
+ // initVal: card.formCache || 'false',
+ // tooltip: '涓昏鐢ㄤ簬鏁版嵁淇敼鍚庯紝鏇存柊鐩稿叧琛ㄥ崟鐨勯�夐」锛屾竻绌虹紦瀛樺悗琛ㄥ崟鍐嶆鎵撳紑鏃舵暟鎹細閲嶆柊鍔犺浇銆�',
+ // required: false,
+ // options: [{
+ // value: 'false',
+ // text: '涓嶆竻绌�'
+ // }, {
+ // value: 'clear',
+ // text: '娓呯┖'
+ // }]
+ // },
+ {
+ type: 'radio',
+ key: 'hidden',
+ label: '闅愯棌',
+ initVal: card.hidden || 'false',
+ tooltip: '闅愯棌鍚庢寜閽湪椤甸潰涓笉鏄剧ず锛屼笖涓嶅弬涓庢潈闄愬垎閰嶃��',
+ required: false,
+ options: [{
+ value: 'false',
+ text: '鍚�'
+ }, {
+ value: 'true',
+ text: '鏄�'
+ }]
+ },
+ {
+ type: 'radio',
+ key: 'database',
+ label: '鏁版嵁搴�',
+ initVal: card.database || 'local',
+ options: [{
+ value: 'local',
+ text: '鏈湴'
+ }, {
+ value: 'sso',
+ text: '鍗曠偣'
+ }]
+ },
+ {
+ type: 'radio',
+ key: 'permission',
+ label: '鏉冮檺楠岃瘉',
+ initVal: card.permission || 'true',
+ required: false,
+ options: [
+ {value: 'true', text: '缁ф壙鑿滃崟'},
+ {value: 'false', text: '绂佺敤'},
+ ],
+ forbid: viewType === 'popview'
+ },
+ {
+ type: 'splitLine',
+ key: 'title',
+ label: '琛ㄥ崟',
+ initVal: ''
+ },
+ {
+ type: 'text',
+ key: 'field',
+ label: '瀛楁',
+ initVal: card.field || '',
+ required: true,
+ readonly: false
+ },
+ {
+ type: 'radio',
+ key: 'size',
+ label: '灏哄',
+ initVal: card.size || 'default',
+ options: [{
+ value: 'large',
+ text: '澶�'
+ }, {
+ value: 'default',
+ text: '涓�'
+ }, {
+ value: 'small',
+ text: '灏�'
+ }]
+ },
+ {
+ type: 'radio',
+ key: 'checkType',
+ label: '閫夋鏍峰紡',
+ initVal: card.checkType || 'circle',
+ options: [{
+ value: 'circle',
+ text: '鍦嗚'
+ }, {
+ value: 'square',
+ text: '鏂硅'
+ }]
+ },
+ {
+ type: 'text',
+ key: 'openVal',
+ label: '寮�鍚��',
+ initVal: card.openVal === undefined ? '' : card.openVal + '',
+ tooltip: '褰撳紑鍚笌鍏抽棴鍊煎潎涓烘鏁存暟鏃讹紝榛樿杞崲涓篒NT绫诲瀷銆�',
+ required: false
+ },
+ {
+ type: 'number',
+ key: 'min',
+ label: '鏈�灏忓��',
+ initVal: card.min,
+ required: false
+ },
+ {
+ type: 'number',
+ key: 'max',
+ label: '鏈�澶у��',
+ initVal: card.max,
+ required: false
+ },
+ {
+ type: 'number',
+ key: 'decimal',
+ label: '灏忔暟浣�',
+ initVal: card.decimal || 0,
+ required: true
+ },
+ {
+ type: 'text',
+ key: 'closeVal',
+ label: '鍏抽棴鍊�',
+ initVal: card.closeVal === undefined ? '' : card.closeVal + '',
+ tooltip: '褰撳紑鍚笌鍏抽棴鍊煎潎涓烘鏁存暟鏃讹紝榛樿杞崲涓篒NT绫诲瀷銆�',
+ required: false
+ },
+ {
+ type: 'text',
+ key: 'openText',
+ label: '寮�鍚彁绀�',
+ initVal: card.openText || '',
+ required: false,
+ },
+ {
+ type: 'text',
+ key: 'closeText',
+ label: '鍏抽棴鎻愮ず',
+ initVal: card.closeText || '',
+ required: false,
+ },
+ {
+ type: 'radio',
+ key: 'execType',
+ label: '璇锋眰鏂瑰紡',
+ initVal: card.execType || 'multi',
+ tooltip: '閫変腑澶氭潯鏁版嵁鏃剁殑璇锋眰鏂瑰紡锛屾敞锛氬綋閫変腑鏁版嵁瓒呰繃20鏉℃椂灏嗛�愭潯璇锋眰銆�',
+ required: false,
+ options: [{
+ value: 'multi',
+ text: '鎵归噺璇锋眰'
+ }, {
+ value: 'single',
+ text: '閫愭潯璇锋眰'
+ }]
+ },
+ {
+ type: 'radio',
+ key: 'progress',
+ label: '杩涘害鎻愮ず',
+ initVal: card.progress || 'number',
+ required: false,
+ forbid: appType === 'mob',
+ options: [{
+ value: 'number',
+ text: '鍓╀綑鏁�'
+ }, {
+ value: 'progressbar',
+ text: '杩涘害鏉�'
+ }]
+ },
+ {
+ type: 'table',
+ key: 'syncComponents',
+ label: '缁勪欢鍒楄〃',
+ initVal: card.syncComponents || [],
+ required: true,
+ actions: ['edit', 'del', 'add', 'move'],
+ columns: [
+ {
+ title: '缁勪欢',
+ dataIndex: 'syncComId',
+ inputType: 'cascader',
+ editable: true,
+ unique: true,
+ required: true,
+ extends: [{key: 'label', value: 'label'}],
+ width: '70%',
+ render: (text, record) => record.label,
+ options: modules
+ }
+ ]
+ },
+ {
+ type: 'radio',
+ key: 'sysId',
+ label: '鑷畾涔塈D',
+ initVal: card.sysId || '',
+ tooltip: '涓嶉�夎鎸夐挳鍙湪鍓嶇鐢熸垚ID鍊�(32浣�)锛屼綔涓哄悗缁彍鍗曠殑BID锛屽瓨鍦ㄦ爣璁版椂锛孖D鍊煎悗灏嗘嫾鎺ユ爣璁板�笺��',
+ required: false,
+ options: [{
+ value: '',
+ text: '缁勪欢BID'
+ }, {
+ value: 'js',
+ text: '鍓嶇鐢熸垚'
+ }, {
+ value: 'empty',
+ text: '绌�'
+ }]
+ },
+ {
+ type: 'text',
+ key: 'sign',
+ label: '鏍囪',
+ initVal: card.sign || '',
+ required: false
+ },
+ {
+ type: 'table',
+ key: 'multiMenus',
+ label: '鑿滃崟鍒楄〃',
+ initVal: card.multiMenus || [],
+ required: true,
+ actions: ['edit', 'del', 'add', 'move'],
+ columns: [
+ {
+ title: '鍚嶇О',
+ dataIndex: 'name',
+ inputType: 'text',
+ editable: true,
+ required: false,
+ width: '30%'
+ },
+ {
+ title: '鑿滃崟',
+ dataIndex: 'menuId',
+ inputType: 'cascader',
+ editable: true,
+ required: true,
+ extends: [{key: 'label', value: 'label', mutilLabel: 'name'}],
+ width: '30%',
+ render: (text, record) => record.label,
+ options: menulist
+ },
+ {
+ title: '鏍囪',
+ dataIndex: 'sign',
+ inputType: 'text',
+ editable: true,
+ required: false,
+ width: '20%'
+ }
+ ]
+ },
+ {
+ type: 'radio',
+ key: 'preHandle',
+ label: '鑷畾涔夎剼鏈�',
+ initVal: card.preHandle || 'false',
+ // tooltip: '闅愯棌鍚庢寜閽湪椤甸潰涓笉鏄剧ず锛屼笖涓嶅弬涓庢潈闄愬垎閰嶃��',
+ required: false,
+ options: [{
+ value: 'false',
+ text: '绂佺敤'
+ }, {
+ value: 'true',
+ text: '鍚敤'
+ }]
+ },
+ {
+ type: 'codemirror',
+ key: 'pre_func',
+ label: '鑷畾涔夎剼鏈�',
+ initVal: card.pre_func || '',
+ required: true,
+ }
+ ]
+
+ return forms
+}
+
+/**
+ * @description 鑾峰彇鎸夐挳琛ㄥ崟閰嶇疆淇℃伅
+ * @param {*} card 缂栬緫鎸夐挳
+ * @param {*} functip 鐢熸垚瀛樺偍杩囩▼鎻愮ず
+ * @param {*} setting 缁勪欢閰嶇疆
+ * @param {*} usefulFields 瀛樺偍杩囩▼鍙敤鐨勫紑濮嬪瓧娈�
+ */
+export function getBaseTableActionForm (card, functip, config, usefulFields, modules, position) {
+ let viewType = sessionStorage.getItem('editMenuType') // 寮圭獥 popview
+ let setting = config.setting || {}
+ let columns = config.columns || []
+
+ let opentypes = [
+ {
+ value: 'pop',
+ text: '寮圭獥锛堣〃鍗曪級'
+ }, {
+ value: 'prompt',
+ text: '鎻愮ず妗�'
+ }, {
+ value: 'exec',
+ text: '鐩存帴鎵ц'
+ }, {
+ value: 'excelIn',
+ text: '瀵煎叆Excel'
+ }, {
+ value: 'excelOut',
+ text: '瀵煎嚭Excel'
+ }, {
+ value: 'popview',
+ text: '寮圭獥锛堟爣绛撅級'
+ }, {
+ value: 'tab',
+ text: '鏍囩椤�'
+ }, {
+ value: 'innerpage',
+ text: '鏂伴〉闈�'
+ }, {
+ value: 'funcbutton',
+ text: '鍔熻兘鎸夐挳'
+ }
+ ]
+
+ let pageTemps = [
+ // { value: 'print', text: '鏍囩鎵撳嵃妯℃澘' },
+ // { value: 'billprintTemp', text: '鍗曟嵁鎵撳嵃妯℃澘' },
+ { value: 'billprint', text: '鍗曟嵁鎵撳嵃' },
+ { value: 'pay', text: '鏀粯' },
+ { value: 'custom', text: '鑷畾涔�' }
+ ]
+
+ if (card.pageTemplate === 'print') { // 鍘熺被鍨嬫敮鎸�
+ pageTemps.unshift({ value: 'print', text: '鏍囩鎵撳嵃妯℃澘' })
+ } else if (card.pageTemplate === 'billprintTemp') { // 鍘熺被鍨嬫敮鎸�
+ pageTemps.unshift({ value: 'billprintTemp', text: '鍗曟嵁鎵撳嵃妯℃澘' })
+ }
+
+ let funTypes = [
+ { value: 'print', text: '鏍囩鎵撳嵃' },
+ { value: 'refund', text: '閫�娆�' },
+ { value: 'closetab', text: '鏍囩鍏抽棴' },
+ { value: 'expPdf', text: '瀵煎嚭PDF' },
+ { value: 'shareLink', text: '鍒嗕韩閾炬帴' },
+ { value: 'megvii', text: '鏃疯闈㈡澘鏈�' },
+ { value: 'filezip', text: '鏂囦欢鍘嬬缉鍖�' },
+ ]
+
+ if (card.funcType === 'changeuser') { // 鍘熺被鍨嬫敮鎸�
+ funTypes.unshift({ value: 'changeuser', text: '鍒囨崲鐢ㄦ埛' })
+ }
+
+ let menulist = sessionStorage.getItem('fstMenuList')
+ if (menulist) {
+ try {
+ menulist = JSON.parse(menulist)
+ } catch (e) {
+ menulist = []
+ }
+ } else {
+ menulist = []
+ }
+
+ let refresh = []
+ if (viewType === 'popview') { // 寮圭獥鏍囩
+ opentypes = opentypes.filter(item => item.value !== 'popview')
+
+ funTypes = funTypes.filter(item => item.value !== 'print')
+
+ refresh.push({
+ value: 'closepoptab', // 鍏抽棴寮圭獥鏍囩
+ text: '鍏抽棴寮圭獥'
+ })
+ }
+
+ if (card.OpenType === 'form') { // 鎷栨嫿娣诲姞绫诲瀷杞崲
+ card.OpenType = 'pop'
+ }
+
+ let extraParam = []
+ if (card.recordUser === 'true') {
+ extraParam.push('recordUser')
+ }
+ if (card.dataM === 'true') {
+ extraParam.push('dataM')
+ }
+
+ let apps = []
+ let merchs = []
+
+ if (window.GLOB.WXApps) {
+ window.GLOB.WXApps.forEach(item => {
+ if (item.appType === 'merchant') {
+ merchs.push({value: item.appId, text: item.appName})
+ } else {
+ apps.push({value: item.appId, text: item.appName})
+ }
+ })
+ }
+
+ let width = card.width || (card.width === 0 ? 0 : 12)
+ if (card.width && /x/.test(card.width)) {
+ width = +width.replace(/x/, '.5')
+ }
+
+ let forms = [
+ {
+ type: 'select',
+ key: 'OpenType',
+ label: '鎸夐挳绫诲瀷',
+ initVal: card.OpenType,
+ required: true,
+ options: opentypes
+ },
+ {
+ type: 'text',
+ key: 'label',
+ label: '鎸夐挳鍚嶇О',
+ initVal: card.label,
+ tooltip: card.uuid ? '鎸夐挳ID锛�' + card.uuid : '',
+ required: true,
+ },
+ {
+ type: 'select',
+ key: 'funcType',
+ label: '鍔熻兘绫诲瀷',
+ initVal: card.funcType || '',
+ required: true,
+ options: funTypes
+ },
+ {
+ type: 'radio',
+ key: 'subFunc',
+ label: '鎺ュ彛鍚嶇О',
+ initVal: card.subFunc || 'addUser',
+ required: true,
+ options: [
+ { value: 'addUser', text: '娣诲姞鐢ㄦ埛' },
+ ]
+ },
+ {
+ type: 'select',
+ key: 'execMode',
+ label: '鎵ц鏂瑰紡',
+ initVal: card.execMode || 'exec',
+ required: true,
+ options: [{
+ value: 'exec',
+ text: '鐩存帴鎵ц'
+ }, {
+ value: 'prompt',
+ text: '鎻愮ず妗�'
+ }, {
+ value: 'pop',
+ text: '寮圭獥锛堣〃鍗曪級'
+ }]
+ },
+ {
+ type: 'radio',
+ key: 'intertype',
+ label: '鎺ュ彛绫诲瀷',
+ initVal: card.intertype || 'system',
+ required: true,
+ options: []
+ },
+ // {
+ // type: 'checkbox',
+ // key: 'payType',
+ // label: '鏀粯鏂瑰紡',
+ // initVal: card.payType || [],
+ // required: true,
+ // options: [{
+ // value: 'wxpay',
+ // text: '寰俊'
+ // // }, {
+ // // value: 'alipay',
+ // // text: '鏀粯瀹�'
+ // }]
+ // },
+ {
+ type: 'radio',
+ key: 'procMode',
+ label: '鍙傛暟澶勭悊',
+ initVal: card.procMode || (card.innerFunc ? 'inner' : 'system'),
+ tooltip: '褰撹繑鍥炲�煎瓨鍦� mk_ex_invoke 涓斿�间负 false 鏃讹紝涓嶄細璋冪敤澶栭儴鎺ュ彛锛涘綋杩斿洖鍊煎瓨鍦� mk_ex_data 鏃讹紝灏嗕互姝や负鍙傛暟鍒嗘壒璇锋眰鑷畾涔夋帴鍙c�傛敞锛氬綋閫夆�滄棤鈥濇椂锛屾寜閽�夎鏃朵細浼犻�掍富閿紝瀛樺湪琛ㄥ崟鏃朵細浼犻�掕〃鍗曞瓧娈碉紝瀛樺湪BID鏃朵細浼燘ID瀛楁銆�',
+ required: true,
+ options: [{
+ value: 'system',
+ text: '绯荤粺鍑芥暟'
+ }, {
+ value: 'inner',
+ text: '鍐呴儴鍑芥暟'
+ }, {
+ value: 'none',
+ text: '鏃�'
+ }]
+ },
+ {
+ type: 'radio',
+ key: 'sqlType',
+ label: '鎿嶄綔绫诲瀷',
+ initVal: card.sqlType || '',
+ required: true,
+ options: []
+ },
+ {
+ type: 'text',
+ key: 'sql',
+ label: '琛ㄥ悕',
+ initVal: card.sql || setting.tableName || '',
+ required: true
+ },
+ {
+ type: 'text',
+ key: 'urlkey',
+ label: '鍦板潃瀛楁',
+ initVal: card.urlkey || '',
+ tooltip: '鍥剧墖锛堟枃浠讹級閾炬帴鐨勫瓧娈靛悕銆�',
+ required: false,
+ readonly: false
+ },
+ {
+ type: 'select',
+ key: 'pageTemplate',
+ label: '椤甸潰绫诲瀷',
+ initVal: card.pageTemplate || '',
+ required: true,
+ options: pageTemps
+ },
+ {
+ type: 'radio',
+ key: 'payMode',
+ label: '鍙傛暟澶勭悊',
+ initVal: card.payMode || 'none',
+ tooltip: '鏀粯锛堟垨閫�娆撅級鍗曞彿鐨勯澶勭悊鏂瑰紡銆�',
+ required: true,
+ options: [{
+ value: 'system',
+ text: '绯荤粺鍑芥暟'
+ }, {
+ value: 'inner',
+ text: '鍐呴儴鍑芥暟'
+ }, {
+ value: 'none',
+ text: '鏃�'
+ }]
+ },
+ {
+ type: 'select',
+ key: 'wxApp',
+ label: '鍏宠仈搴旂敤',
+ initVal: card.wxApp || '',
+ tooltip: '璇峰叧鑱旀敮浠樼殑鍏紬鍙锋垨灏忕▼搴忋��',
+ required: true,
+ forbid: apps.length === 0,
+ options: apps
+ },
+ {
+ type: 'select',
+ key: 'wxMerch',
+ label: '鍏宠仈鍟嗘埛',
+ initVal: card.wxMerch || '',
+ tooltip: '璇峰叧鑱旀敮浠樼殑鍟嗘埛鍙枫��',
+ required: true,
+ forbid: merchs.length === 0,
+ options: merchs
+ },
+ {
+ type: 'text',
+ key: 'innerFunc',
+ label: '鍐呴儴鍑芥暟',
+ initVal: card.innerFunc || '',
+ tooltip: functip,
+ fields: usefulFields,
+ required: false,
+ },
+ {
+ type: 'printTemps',
+ key: 'printTemp',
+ label: '鎵撳嵃妯℃澘',
+ initVal: card.printTemp || '',
+ help: (record) => {
+ if (record.printTemp) {
+ return <span onClick={() => {
+ sessionStorage.setItem('mk-print-temp', record.printTemp)
+ window.open('#/hs')
+
+ setTimeout(() => {
+ sessionStorage.removeItem('mk-print-temp')
+ }, 50)
+ }} style={{color: '#1890ff', cursor: 'pointer', fontSize: '13px'}}>#鏌ョ湅妯℃澘</span>
+ }
+ return ''
+ },
+ required: true
+ },
+ {
+ type: 'cascader',
+ key: 'linkmenu',
+ label: '鍏宠仈鑿滃崟',
+ initVal: card.linkmenu || [],
+ required: true,
+ extendName: 'MenuNo',
+ options: menulist.length ? [...menulist, {value: 'multiMenu', label: '澶氳彍鍗�'}] : []
+ },
+ {
+ type: 'textarea',
+ key: 'url',
+ label: '椤甸潰鍦板潃',
+ initVal: card.url || '',
+ tooltip: '鍦ㄩ摼鎺ヤ腑浠***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆傚湴鍧�鏍煎紡涓猴細******/admin/index.html#/iframe/menuId/@loginuid@ 浼氭墦寮�鏍囩椤点��',
+ toolWidth: 350,
+ required: true
+ },
+ {
+ type: 'textarea',
+ key: 'proUrl',
+ label: '姝e紡鍦板潃',
+ initVal: card.proUrl || '',
+ tooltip: '鍦ㄩ摼鎺ヤ腑浠***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆傚湴鍧�鏍煎紡涓猴細******/admin/index.html#/iframe/menuId/@loginuid@ 浼氭墦寮�鏍囩椤点��',
+ toolWidth: 350,
+ required: false
+ },
+ {
+ type: 'radio',
+ key: 'sysInterface',
+ label: '绯荤粺绫诲瀷',
+ initVal: card.sysInterface || 'false',
+ tooltip: '涓氬姟绯荤粺鎸囧悓涓�sso涓嬬殑鍏朵粬涓氬姟绯荤粺锛屽閮ㄧ郴缁熸寚涓嶅悓sso涓嬬殑鍏朵粬涓氬姟绯荤粺銆�',
+ required: true,
+ options: [{
+ value: 'false',
+ text: '涓氬姟'
+ }, {
+ value: 'true',
+ text: '鍗曠偣'
+ }, {
+ value: 'external',
+ text: '澶栭儴'
+ }]
+ },
+ {
+ type: 'text',
+ key: 'outerFunc',
+ label: '澶栭儴鍑芥暟',
+ initVal: card.outerFunc || '',
+ required: false,
+ },
+ {
+ type: 'textarea',
+ key: 'interface',
+ label: '娴嬭瘯鍦板潃',
+ initVal: card.sysInterface === 'true' ? (window.GLOB.mainSystemApi || '') : (card.interface || ''),
+ required: true,
+ readonly: card.sysInterface === 'true'
+ },
+ {
+ type: 'textarea',
+ key: 'proInterface',
+ label: '姝e紡鍦板潃',
+ initVal: card.proInterface || '',
+ tooltip: '姝e紡绯荤粺鎵�浣跨敤鐨勬帴鍙e湴鍧�銆�',
+ required: false
+ },
+ {
+ type: 'keyinterface',
+ key: 'exInterface',
+ label: '娴嬭瘯鍦板潃',
+ initVal: card.exInterface || '',
+ required: true
+ },
+ {
+ type: 'keyinterface',
+ key: 'exProInterface',
+ label: '姝e紡鍦板潃',
+ initVal: card.exProInterface || '',
+ tooltip: '姝e紡绯荤粺鎵�浣跨敤鐨勬帴鍙e湴鍧�銆�',
+ required: false
+ },
+ {
+ type: 'radio',
+ key: 'callbackType',
+ label: '鍥炶皟鏂瑰紡',
+ initVal: card.callbackType || (card.callbackFunc ? 'func' : 'none'),
+ tooltip: '浣跨敤鍚庡彴鑴氭湰鎵ц鏃讹紝闇�瑕侀厤鍚堣鍒掍换鍔°��',
+ required: true,
+ options: [{
+ value: 'script',
+ text: '鑷畾涔夎剼鏈�'
+ }, {
+ value: 'default',
+ text: '鍚庡彴鑴氭湰'
+ }, {
+ value: 'func',
+ text: '鍥炶皟鍑芥暟'
+ }, {
+ value: 'none',
+ text: '鏃�'
+ }]
+ },
+ {
+ type: 'text',
+ key: 'cbTable',
+ label: '鍥炶皟琛ㄥ悕',
+ initVal: card.cbTable || '',
+ required: true
+ },
+ {
+ type: 'text',
+ key: 'callbackFunc',
+ label: '鍥炶皟鍑芥暟',
+ initVal: card.callbackFunc || '',
+ required: true
+ },
+ {
+ type: 'radio',
+ key: 'method',
+ label: '璇锋眰鏂瑰紡',
+ initVal: card.method || 'post',
+ required: true,
+ options: [{
+ value: 'get',
+ text: 'GET'
+ }, {
+ value: 'post',
+ text: 'POST'
+ }]
+ },
+ {
+ type: 'radio',
+ key: 'cross',
+ label: '鎺ュ彛璺ㄥ煙',
+ initVal: card.cross || 'true',
+ tooltip: '濡傛灉鑷畾涔夋帴鍙d笉鏀寔璺ㄥ煙璇锋眰锛屼細閫氳繃褰撳墠绯荤粺杞彂銆�',
+ required: false,
+ options: [{
+ value: 'true',
+ text: '鏀寔'
+ }, {
+ value: 'false',
+ text: '涓嶆敮鎸�'
+ }]
+ },
+ {
+ type: 'radio',
+ key: 'stringify',
+ label: '搴忓垪鍖�',
+ initVal: card.stringify || 'text',
+ required: false,
+ options: [{
+ value: 'text',
+ text: 'Text'
+ }, {
+ value: 'JSON',
+ text: 'JSON'
+ }, {
+ value: 'qs',
+ text: 'qs'
+ }]
+ },
+ {
+ type: 'text',
+ key: 'ContentType',
+ label: 'Content-Type',
+ initVal: card.ContentType || '',
+ tooltip: '榛樿鍊硷細application/x-www-form-urlencoded;charset=UTF-8',
+ required: false
+ },
+ {
+ type: 'text',
+ key: 'outerBlacklist',
+ label: '瀛楁榛戝悕鍗�',
+ initVal: card.outerBlacklist || '',
+ tooltip: '涓嶉渶瑕佸洖浼犵殑瀛楁鍙缃瓧娈甸粦鍚嶅崟锛屽涓�艰鐢ㄩ�楀彿鍒嗛殧銆�',
+ required: false
+ },
+ {
+ type: 'select',
+ key: 'Ot',
+ label: '琛岃缃�',
+ initVal: card.Ot || (card.sqlType === 'insert' ? 'notRequired' : 'requiredSgl'),
+ required: true,
+ options: []
+ },
+ {
+ type: 'select',
+ key: 'execSuccess',
+ label: '鎴愬姛鍚�',
+ initVal: card.execSuccess || 'grid',
+ tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳锛堝脊绐楁寜閽級涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻�傚闇�鑱氱劍琛ㄥ崟璇蜂互 @focus:鑱氱劍瀛楁@ 鏍煎紡杩斿洖銆傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級锛汙no_target_menu@ 涓嶆墽琛屾墦寮�鑿滃崟銆�' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂扮粍浠讹紱閫夋嫨鍒锋柊琛� / 缁勪欢鏃讹紝濡傛灉褰撳墠琛屾暟鎹笉瀛樺湪浼氬埛鏂扮粍浠躲�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆傚闇�鑱氱劍琛ㄥ崟璇蜂互 @focus:鑱氱劍瀛楁@ 鏍煎紡杩斿洖銆傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級锛汙no_target_menu@ 涓嶆墽琛屾墦寮�鑿滃崟銆�',
+ required: true,
+ options: [{
+ value: 'never',
+ text: '涓嶅埛鏂�'
+ }, {
+ value: 'line',
+ text: '鍒锋柊琛�'
+ }, {
+ value: 'grid',
+ text: '鍒锋柊褰撳墠缁勪欢'
+ }, {
+ value: 'line_grid',
+ text: '鍒锋柊琛� / 缁勪欢',
+ }, {
+ value: 'mainline',
+ text: '鍒锋柊涓婄骇缁勪欢 - 琛�'
+ }, {
+ value: 'maingrid',
+ text: '鍒锋柊涓婄骇缁勪欢'
+ },
+ ...refresh]
+ },
+ {
+ type: 'select',
+ key: 'execError',
+ label: '澶辫触鍚�',
+ initVal: card.execError || 'never',
+ tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳锛堝脊绐楁寜閽級涓缃叧闂悗鍒锋柊鍝竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻�傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級銆�' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂扮粍浠讹紱閫夋嫨鍒锋柊琛� / 缁勪欢鏃讹紝濡傛灉褰撳墠琛屾暟鎹笉瀛樺湪浼氬埛鏂扮粍浠躲�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆傚闇�璇煶鎾姤璇蜂互@speak@寮�澶达紝鎾姤鍐呭鎴栨枃浠舵斁缃簬<<>>涓�傝繑鍥炰俊鎭紙@retmsg锛夌壒娈婃爣璇嗭細@close_tab@ 鎵ц锛堝叧闂爣绛�-绠$悊绯荤粺锛夛紱@close_popup@ 鎵ц锛堝叧闂脊绐楋級锛汙goback@ 鎵ц锛堣繑鍥炰笂涓�椤�-瀛愬簲鐢級銆�',
+ required: true,
+ options: [{
+ value: 'never',
+ text: '涓嶅埛鏂�'
+ }, {
+ value: 'line',
+ text: '鍒锋柊琛�'
+ }, {
+ value: 'grid',
+ text: '鍒锋柊褰撳墠缁勪欢'
+ }, {
+ value: 'line_grid',
+ text: '鍒锋柊琛� / 缁勪欢',
+ }, {
+ value: 'mainline',
+ text: '鍒锋柊涓婄骇缁勪欢 - 琛�'
+ }, {
+ value: 'maingrid',
+ text: '鍒锋柊涓婄骇缁勪欢'
+ },
+ ...refresh]
+ },
+ {
+ type: 'select',
+ key: 'popClose',
+ label: '鍏抽棴鍚�',
+ initVal: card.popClose || 'grid',
+ required: true,
+ options: [{
+ value: 'never',
+ text: '涓嶅埛鏂�'
+ }, {
+ value: 'grid',
+ text: '鍒锋柊褰撳墠缁勪欢'
+ }, {
+ value: 'mainline',
+ text: '鍒锋柊涓婄骇缁勪欢 - 琛�'
+ }, {
+ value: 'maingrid',
+ text: '鍒锋柊涓婄骇缁勪欢'
+ }]
+ },
+ {
+ type: 'radio',
+ key: 'resetPageIndex',
+ label: '鍒锋柊鏃�',
+ initVal: card.resetPageIndex || 'true',
+ required: false,
+ options: [{
+ value: 'true',
+ text: '閲嶇疆椤电爜'
+ }, {
+ value: 'false',
+ text: '涓嶉噸缃�'
+ }]
+ },
+ // {
+ // type: 'radio',
+ // key: 'exportType',
+ // label: '瀵煎嚭鏂瑰紡',
+ // initVal: card.exportType || 'download',
+ // tooltip: '',
+ // required: true,
+ // options: [{
+ // value: 'download',
+ // text: '涓嬭浇鏈湴'
+ // }, {
+ // value: 'link',
+ // text: '鐢熸垚閾炬帴'
+ // }]
+ // },
+ {
+ type: 'radio',
+ key: 'shortUrl',
+ label: '鐭摼鎺�',
+ initVal: card.shortUrl || 'false',
+ options: [{
+ value: 'false',
+ text: '绂佺敤'
+ }, {
+ value: 'true',
+ text: '鍚敤'
+ }]
+ },
+ {
+ type: 'textarea',
+ key: 'shareUrl',
+ label: '閾炬帴鍦板潃',
+ initVal: card.shareUrl || '',
+ tooltip: '閾炬帴涓鏋滃瓨鍦ˊBID@鎴朄ID@灏嗚嚜鍔ㄦ浛鎹€��',
+ required: true
+ },
+ {
+ type: 'textarea',
+ key: 'shareProUrl',
+ label: '姝e紡閾炬帴',
+ initVal: card.shareProUrl || '',
+ tooltip: '閾炬帴涓鏋滃瓨鍦ˊBID@鎴朄ID@灏嗚嚜鍔ㄦ浛鎹€��',
+ required: false
+ },
+ {
+ type: 'text',
+ key: 'shareTip',
+ label: '鍒嗕韩鎻愮ず',
+ initVal: card.shareTip || '',
+ tooltip: '鍒嗕韩鏃跺鐢ㄦ埛鐨勬彁绀轰俊鎭��',
+ required: false
+ },
+ {
+ type: 'number',
+ key: 'width',
+ min: 0,
+ max: 24,
+ precision: 1,
+ label: '瀹藉害',
+ initVal: width,
+ tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼�備负 0 鏃跺搴﹁嚜閫傚簲銆傚彲璁剧疆鍗婂垪鍗�.5銆�',
+ forbid: position !== 'line',
required: true
},
{
@@ -458,26 +2375,26 @@
},
{
type: 'radio',
- key: 'swipe',
- label: "婊戝姩鏄剧ず",
- initVal: card.swipe || 'false',
+ key: 'hover',
+ label: '鎮诞鏁堟灉',
+ initVal: card.hover || '',
+ tooltip: '榧犳爣鎮诞鎸夐挳涓婃柟鏃剁殑棰滆壊鍙樺寲銆�',
required: false,
- forbid: (type !== 'datacard' || appType !== 'mob'),
options: [{
- value: 'false',
- text: '鍚�'
+ value: '',
+ text: '鏃�'
}, {
- value: 'left',
- text: '宸︽粦'
+ value: 'mk-btn-hover-bg',
+ text: '鑳屾櫙鍙樺寲'
}, {
- value: 'right',
- text: '鍙虫粦'
+ value: 'mk-btn-hover-border',
+ text: '杈规鍙樺寲'
}]
},
{
type: 'icon',
key: 'icon',
- label: Formdict['model.icon'],
+ label: '鍥炬爣',
initVal: card.icon,
required: false,
options: []
@@ -485,45 +2402,62 @@
{
type: 'select',
key: 'class',
- label: Formdict['model.form.color'],
+ label: '棰滆壊',
initVal: card.class,
- tooltip: '姝ら鑹蹭负鎸夐挳鍒濆鍖栭鑹诧紝鍙湪鏍峰紡璋冩暣涓慨鏀广��',
required: false,
- options: []
- },
- {
- type: 'radio',
- key: 'joint',
- label: Formdict['model.form.paramJoint'],
- initVal: card.joint || 'true',
- required: false,
- options: [{
- value: 'true',
- text: Formdict['model.true']
- }, {
- value: 'false',
- text: Formdict['model.false']
- }]
+ options: btnClasses
},
{
type: 'text',
key: 'sheet',
- label: Formdict['model.form.tablename'],
+ label: '琛ㄥ悕',
initVal: card.sheet || setting.tableName || '',
required: true
},
{
+ type: 'cascader',
+ key: 'syncComponent',
+ label: '鍒锋柊缁勪欢',
+ initVal: card.syncComponent || [],
+ tooltip: '鎵ц鎴愬姛鍚庯紙鎵ц澶辫触涓斿瓨鍦ㄥ埛鏂伴」銆佸脊绐楁爣绛惧叧闂級锛岄渶瑕佸悓姝ュ埛鏂扮殑缁勪欢銆傛敞锛氶�夋嫨褰撳墠缁勪欢鐨勪笂绾х粍浠舵棤鏁堬紝鍒锋柊涓婄骇缁勪欢璇烽�夋嫨鎴愬姛鍚庘�滃埛鏂颁笂绾х粍浠� - 琛屸�濄��',
+ required: false,
+ options: modules.length ? [...modules, {value: 'multiComponent', label: '澶氱粍浠�'}] : []
+ },
+ {
+ type: 'cascader',
+ key: 'refreshTab',
+ label: '鍒锋柊鑿滃崟',
+ initVal: card.refreshTab || [],
+ tooltip: '鎵ц鎴愬姛鍚庯紙鎴栨墽琛屽け璐ヤ笖瀛樺湪鍒锋柊椤规椂锛夛紝闇�瑕佸悓姝ュ埛鏂扮殑鑿滃崟',
+ required: false,
+ forbid: viewType === 'popview',
+ options: menulist
+ },
+ {
+ type: 'cascader',
+ key: 'openmenu',
+ label: '鎵撳紑鑿滃崟',
+ tooltip: '鎵ц鎴愬姛鍚庨渶瑕佹墦寮�鐨勮彍鍗曘��',
+ initVal: card.openmenu || [],
+ extendName: 'MenuNo',
+ required: false,
+ allowClear: true,
+ options: menulist,
+ forbid: viewType === 'popview'
+ },
+ {
type: 'radio',
key: 'pagination',
- label: Formdict['header.form.pagination'],
+ label: '鍒嗛〉',
initVal: card.pagination || 'false',
+ tooltip: '瀵煎嚭鏁版嵁閲忚緝澶ф椂锛�1000+锛夛紝鍙缃垎椤佃姹傛暟鎹��',
required: false,
options: [{
value: 'true',
- text: Formdict['model.true']
+ text: '鏄�'
}, {
value: 'false',
- text: Formdict['model.false']
+ text: '鍚�'
}]
},
{
@@ -541,85 +2475,55 @@
}]
},
{
- type: 'cascader',
- key: 'syncComponent',
- label: '鍒锋柊缁勪欢',
- initVal: card.syncComponent || [],
- tooltip: '鎵ц鎴愬姛鍚庯紝闇�瑕佸悓姝ュ埛鏂扮殑缁勪欢',
- required: false,
- options: modules
- },
- {
- type: 'cascader',
- key: 'switchTab',
- label: '鍒囨崲鏍囩',
- initVal: card.switchTab || [],
- tooltip: '鎵ц鎴愬姛鍚庯紝闇�瑕佸垏鎹㈢殑鏍囩椤�',
- required: false,
- options: tabs
- },
- {
- type: 'cascader',
- key: 'refreshTab',
- label: '鍒锋柊鑿滃崟',
- initVal: card.refreshTab || [],
- tooltip: '鎵ц鎴愬姛鍚庢垨鏍囩鍏抽棴鏃讹紝闇�瑕佸悓姝ュ埛鏂扮殑鑿滃崟',
- required: false,
- forbid: isApp,
- options: menulist
- },
- {
- type: 'select',
- key: 'controlField',
- label: '鎺у埗瀛楁',
- tooltip: '绂佺敤鎺у埗瀛楁锛屽彲鏍规嵁鏁版嵁鎺у埗鎸夐挳鏄惁绂佺敤銆�',
- initVal: card.controlField || '',
- required: false,
- allowClear: true,
- options: columns
- },
- {
- type: 'text',
- key: 'controlVal',
- label: '鎺у埗鍊�',
- tooltip: '褰撻�夋嫨鎺у埗瀛楁锛屼笖瀛楁鍊间笌鎺у埗鍊肩浉绛夋椂锛屾寜閽細绂佺敤锛屽涓�肩敤閫楀彿鍒嗛殧銆�',
- initVal: card.controlVal || '',
- required: false
- },
- {
- type: 'select',
- key: 'openmenu',
- label: '鎵撳紑鑿滃崟',
- tooltip: '鎵ц鎴愬姛鍚庨渶瑕佹墦寮�鐨勮彍鍗曘��',
- initVal: card.openmenu || '',
- forbid: appType !== 'pc' && appType !== 'mob',
- required: false,
- allowClear: true,
- options: appType !== 'mob' ? appMenus : [...appMenus, {value: 'goback', text: '杩斿洖'}]
- },
- {
type: 'text',
key: 'output',
label: '杩斿洖鍊�',
- tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺��',
+ tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺�傜郴缁熷嚱鏁板彲鎸囧畾杩斿洖鐨勫彉閲忥紙浠绗﹀紑澶达紝杩斿洖id鏃跺彲浣跨敤@id@锛夛紱鑷畾涔夊嚱鏁板彲鎸囧畾杩斿洖瀛楁锛堝id锛夈��',
initVal: card.output || '',
- forbid: appType !== 'pc' && appType !== 'mob',
+ required: false,
+ // forbid: viewType === 'popview'
+ },
+ {
+ type: 'text',
+ key: 'tipTitle',
+ label: '纭鎻愮ず',
+ initVal: card.tipTitle || '',
+ tooltip: '鎻愮ず妗嗙殑纭鎻愮ず淇℃伅銆�',
required: false
},
{
+ type: 'text',
+ key: 'hoverTitle',
+ label: '鎮诞鎻愮ず',
+ initVal: card.hoverTitle || '',
+ tooltip: '榧犳爣鎮诞鍦ㄦ寜閽笂鏂规椂鐨勬彁绀轰俊鎭��',
+ required: false
+ },
+ {
+ type: 'select',
+ key: 'showName',
+ label: '鏄剧ず鍐呭',
+ initVal: card.showName || '',
+ tooltip: '琛岀骇鎸夐挳鍙�氳繃琛屼俊鎭帶鍒舵寜閽樉绀哄唴瀹广��',
+ required: false,
+ allowClear: true,
+ forbid: position !== 'line',
+ options: columns.map(item => ({
+ value: item.field,
+ text: `${item.label}锛�${item.field}锛塦
+ }))
+ },
+ {
type: 'radio',
- key: 'open',
+ key: 'openTab',
label: '鎵撳紑鏂瑰紡',
- initVal: card.open || 'blank',
- required: true,
- forbid: appType !== 'pc',
- options: [{
- value: 'blank',
- text: '鏂扮獥鍙�'
- }, {
- value: 'self',
- text: '褰撳墠绐楀彛'
- }]
+ initVal: card.openTab || 'newtab',
+ tooltip: '鑿滃崟鎵撳紑鏂瑰紡銆�',
+ options: [
+ {value: 'newtab', text: '鏍囩椤�'},
+ // {value: 'newpage', text: '鏂伴〉闈紙鏍囩椤碉級'},
+ {value: 'view', text: '鏂伴〉闈紙鍏ㄥ睆锛�'}
+ ]
},
{
type: 'radio',
@@ -639,19 +2543,18 @@
type: 'number',
key: 'ratio',
min: 1,
- max: 24,
+ max: 3000,
precision: 0,
label: '姣斾緥',
initVal: card.ratio || 85,
- tooltip: '灏忎簬100涓哄搴︼紙鎴栭珮搴︼級鐧惧垎姣旓紝澶т簬100涓哄儚绱犲�笺��',
+ tooltip: '妯℃�佹鎴栨娊灞夌殑瀹藉害锛屽皬浜�100涓虹獥鍙e搴︼紙鎴栭珮搴︼級鐧惧垎姣旓紝澶т簬100涓哄儚绱犲�笺��',
required: true
},
{
type: 'radio',
key: 'placement',
- label: '鎶藉眽鏂瑰悜',
+ label: '寮瑰嚭鏂瑰悜',
initVal: card.placement || 'right',
- tooltip: '浣跨敤鎶藉眽鏃舵湁鏁堛��',
required: false,
options: [{
value: 'right',
@@ -667,6 +2570,295 @@
text: '涓嬩晶'
}]
},
+ {
+ type: 'radio',
+ key: 'clickouter',
+ label: '鐐瑰嚮钂欏眰',
+ initVal: card.clickouter || 'unclose',
+ required: false,
+ options: [{
+ value: 'unclose',
+ text: '涓嶅叧闂�'
+ }, {
+ value: 'close',
+ text: '鍏抽棴'
+ }]
+ },
+ {
+ type: 'radio',
+ key: 'popshow',
+ label: '寮圭獥灞曠ず',
+ initVal: card.popshow || 'default',
+ tooltip: '灏忕獥鍙e睍绀哄皢闅愯棌鏍囬鍙婂簳閮ㄦ寜閽��',
+ required: false,
+ options: [{
+ value: 'default',
+ text: '榛樿'
+ }, {
+ value: 'miniview',
+ text: '灏忕獥鍙�'
+ }]
+ },
+ {
+ type: 'text',
+ key: 'preFunc',
+ label: '鍓嶇疆鍑芥暟',
+ initVal: card.preFunc || '',
+ tooltip: '鍓嶇疆鍑芥暟鎵ц瀹屾垚鍚庯紝缁撴灉浼氫紶鍏ュ唴閮ㄥ嚱鏁颁腑锛屾鏃跺唴閮ㄥ嚱鏁颁細寮傛鎵ц锛涘綋鍓嶇疆鍑芥暟杩斿洖涓璄rrCode绛変簬-1鏃讹紝灏嗕笉鍐嶆墽琛屽唴閮ㄥ嚱鏁般��',
+ required: false
+ },
+ {
+ type: 'checkbox',
+ key: 'extraParam',
+ label: '鎵╁睍鍙傛暟',
+ initVal: extraParam,
+ tooltip: '閫夋嫨鈥滅敤鎴蜂俊鎭�濇椂锛屽唴閮ㄥ嚱鏁扮殑浼犲弬浼氬鍔� username 涓� fullname銆傞�夋嫨鈥滄暟鎹鐞嗗憳鈥濇椂锛屽唴閮ㄥ嚱鏁扮殑浼犲弬浼氬鍔� dataM 锛岀鐞嗗憳鍊间负鈥淵鈥濓紝鏅�氱敤鎴蜂负绌恒��',
+ required: false,
+ options: [{
+ value: 'recordUser',
+ text: '鐢ㄦ埛淇℃伅'
+ }, {
+ value: 'dataM',
+ text: '鏁版嵁绠$悊鍛�'
+ }]
+ },
+ {
+ type: 'radio',
+ key: 'control',
+ label: '鎸夐挳鎺у埗',
+ initVal: card.control || (card.controlField ? 'disabled' : ''),
+ tooltip: '褰撻�夋嫨绂佺敤鎴栭殣钘忥紝涓斿瓧娈靛�间笌鎺у埗鍊肩浉绛夋椂锛屾寜閽細闅愯棌鎴栫鐢ㄣ�傚綋閫夋嫨涓婄骇锛屼富琛ㄥ瓧娈靛�间笌鎺у埗鍊肩浉绛夋垨涓昏〃瀛楁鍊间笉瀛樺湪鏃讹紝鎸夐挳浼氶殣钘忋�傛敞锛氬涓�肩敤閫楀彿鍒嗛殧',
+ required: false,
+ options: [{
+ value: '',
+ text: '鏃�'
+ }, {
+ value: 'disabled',
+ text: '绂佺敤'
+ }, {
+ value: 'hidden',
+ text: '闅愯棌'
+ }, {
+ value: 'parent',
+ text: '涓婄骇'
+ }]
+ },
+ {
+ type: 'select',
+ key: 'controlField',
+ label: '鎺у埗瀛楁',
+ initVal: card.controlField || '',
+ required: true,
+ allowClear: true,
+ options: columns.map(item => ({
+ value: item.field,
+ text: `${item.label}锛�${item.field}锛塦
+ }))
+ },
+ {
+ type: 'text',
+ key: 'controlVal',
+ label: '鎺у埗鍊�',
+ initVal: card.controlVal || '',
+ required: false
+ },
+ {
+ type: 'text',
+ key: 'reason',
+ label: '绂佺敤鍘熷洜',
+ initVal: card.reason || '',
+ required: false
+ },
+ // {
+ // type: 'radio',
+ // key: 'formCache',
+ // label: '琛ㄥ崟缂撳瓨',
+ // initVal: card.formCache || 'false',
+ // tooltip: '涓昏鐢ㄤ簬鏁版嵁淇敼鍚庯紝鏇存柊鐩稿叧琛ㄥ崟鐨勯�夐」锛屾竻绌虹紦瀛樺悗琛ㄥ崟鍐嶆鎵撳紑鏃舵暟鎹細閲嶆柊鍔犺浇銆�',
+ // required: false,
+ // options: [{
+ // value: 'false',
+ // text: '涓嶆竻绌�'
+ // }, {
+ // value: 'clear',
+ // text: '娓呯┖'
+ // }]
+ // },
+ {
+ type: 'radio',
+ key: 'hidden',
+ label: '闅愯棌',
+ initVal: card.hidden || 'false',
+ tooltip: '闅愯棌鍚庢寜閽湪椤甸潰涓笉鏄剧ず锛屼笖涓嶅弬涓庢潈闄愬垎閰嶃��',
+ required: false,
+ options: [{
+ value: 'false',
+ text: '鍚�'
+ }, {
+ value: 'true',
+ text: '鏄�'
+ }]
+ },
+ {
+ type: 'radio',
+ key: 'database',
+ label: '鏁版嵁搴�',
+ initVal: card.database || 'local',
+ options: [{
+ value: 'local',
+ text: '鏈湴'
+ }, {
+ value: 'sso',
+ text: '鍗曠偣'
+ }]
+ },
+ {
+ type: 'radio',
+ key: 'permission',
+ label: '鏉冮檺楠岃瘉',
+ initVal: card.permission || 'true',
+ required: false,
+ options: [
+ {value: 'true', text: '鍚敤'},
+ {value: 'false', text: '绂佺敤'},
+ ],
+ forbid: viewType === 'popview'
+ },
+ {
+ type: 'radio',
+ key: 'execType',
+ label: '璇锋眰鏂瑰紡',
+ initVal: card.execType || 'multi',
+ tooltip: '閫変腑澶氭潯鏁版嵁鏃剁殑璇锋眰鏂瑰紡锛屾敞锛氬綋閫変腑鏁版嵁瓒呰繃20鏉℃椂灏嗛�愭潯璇锋眰銆�',
+ required: false,
+ options: [{
+ value: 'multi',
+ text: '鎵归噺璇锋眰'
+ }, {
+ value: 'single',
+ text: '閫愭潯璇锋眰'
+ }]
+ },
+ {
+ type: 'radio',
+ key: 'progress',
+ label: '杩涘害鎻愮ず',
+ initVal: card.progress || 'number',
+ required: false,
+ options: [{
+ value: 'number',
+ text: '鍓╀綑鏁�'
+ }, {
+ value: 'progressbar',
+ text: '杩涘害鏉�'
+ }]
+ },
+ {
+ type: 'table',
+ key: 'syncComponents',
+ label: '缁勪欢鍒楄〃',
+ initVal: card.syncComponents || [],
+ required: true,
+ actions: ['edit', 'del', 'add', 'move'],
+ columns: [
+ {
+ title: '缁勪欢',
+ dataIndex: 'syncComId',
+ inputType: 'cascader',
+ unique: true,
+ editable: true,
+ required: true,
+ extends: [{key: 'label', value: 'label'}],
+ width: '70%',
+ render: (text, record) => record.label,
+ options: modules
+ }
+ ]
+ },
+ {
+ type: 'radio',
+ key: 'sysId',
+ label: '鑷畾涔塈D',
+ initVal: card.sysId || '',
+ tooltip: '涓嶉�夎鎸夐挳鍙湪鍓嶇鐢熸垚ID鍊�(32浣�)锛屼綔涓哄悗缁彍鍗曠殑BID锛屽瓨鍦ㄦ爣璁版椂锛孖D鍊煎悗灏嗘嫾鎺ユ爣璁板�笺��',
+ required: false,
+ options: [{
+ value: '',
+ text: '缁勪欢BID'
+ }, {
+ value: 'js',
+ text: '鍓嶇鐢熸垚'
+ }, {
+ value: 'empty',
+ text: '绌�'
+ }]
+ },
+ {
+ type: 'text',
+ key: 'sign',
+ label: '鏍囪',
+ initVal: card.sign || '',
+ required: false
+ },
+ {
+ type: 'table',
+ key: 'multiMenus',
+ label: '鑿滃崟鍒楄〃',
+ initVal: card.multiMenus || [],
+ required: true,
+ actions: ['edit', 'del', 'add', 'move'],
+ columns: [
+ {
+ title: '鍚嶇О',
+ dataIndex: 'name',
+ inputType: 'text',
+ editable: true,
+ required: false,
+ width: '30%'
+ },
+ {
+ title: '鑿滃崟',
+ dataIndex: 'menuId',
+ inputType: 'cascader',
+ editable: true,
+ required: true,
+ extends: [{key: 'label', value: 'label', mutilLabel: 'name'}],
+ width: '30%',
+ render: (text, record) => record.label,
+ options: menulist
+ },
+ {
+ title: '鏍囪',
+ dataIndex: 'sign',
+ inputType: 'text',
+ editable: true,
+ required: false,
+ width: '20%'
+ }
+ ]
+ },
+ {
+ type: 'radio',
+ key: 'preHandle',
+ label: '鑷畾涔夎剼鏈�',
+ initVal: card.preHandle || 'false',
+ // tooltip: '闅愯棌鍚庢寜閽湪椤甸潰涓笉鏄剧ず锛屼笖涓嶅弬涓庢潈闄愬垎閰嶃��',
+ required: false,
+ options: [{
+ value: 'false',
+ text: '绂佺敤'
+ }, {
+ value: 'true',
+ text: '鍚敤'
+ }]
+ },
+ {
+ type: 'codemirror',
+ key: 'pre_func',
+ label: '鑷畾涔夎剼鏈�',
+ initVal: card.pre_func || '',
+ required: true,
+ }
]
return forms
--
Gitblit v1.8.0