From b8e1395f02c929eaa96b949cf6027ee2a43856a6 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 06 九月 2022 19:03:37 +0800 Subject: [PATCH] 2022-09-06 --- src/menu/components/share/actioncomponent/formconfig.jsx | 557 ++++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 421 insertions(+), 136 deletions(-) diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index 42d604e..789803c 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -1,5 +1,6 @@ import zhCN from '@/locales/zh-CN/model.js' import enUS from '@/locales/en-US/model.js' +import { btnCustomClasses } from '@/utils/option.js' const Formdict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS @@ -11,9 +12,11 @@ * @param {*} usefulFields 瀛樺偍杩囩▼鍙敤鐨勫紑濮嬪瓧娈� * @param {*} type 鎸夐挳绫诲瀷锛岀敤浜庡尯鍒嗗彲閫夌殑鎵撳紑鏂瑰紡 */ -export function getActionForm (card, functip, config, usefulFields, type, menulist = [], modules = []) { +export function getActionForm (card, functip, config, usefulFields, type, menulist = [], modules = [], anchors = []) { let appType = sessionStorage.getItem('appType') let viewType = sessionStorage.getItem('editMenuType') // 寮圭獥 popview + let printTemps = sessionStorage.getItem('printTemps') + printTemps = printTemps ? JSON.parse(printTemps) : [] let setting = config.setting || {} let columns = config.columns || [] let appMenus = [] @@ -49,42 +52,57 @@ ] 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') { - opentypes = [ - { - value: 'excelIn', - text: Formdict['model.form.excelIn'] - }, { - value: 'excelOut', - text: Formdict['model.form.excelOut'] - } - ] - } - - let tabs = getTabs(JSON.parse(JSON.stringify(modules))) + // if (type === 'editable') { + // opentypes = [ + // { + // value: 'excelIn', + // text: Formdict['model.form.excelIn'] + // }, { + // value: 'excelOut', + // text: Formdict['model.form.excelOut'] + // } + // ] + // } + 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: Formdict['header.form.func.changeuser'] }, { value: 'print', text: '鏍囩鎵撳嵃' }, + { value: 'refund', text: '閫�娆�' }, { value: 'closetab', text: '鏍囩鍏抽棴' }, + { value: 'changeuser', text: '鍒囨崲鐢ㄦ埛' }, + { value: 'megvii', text: '鏃疯闈㈡澘鏈�' }, + { value: 'filezip', text: '鏂囦欢鍘嬬缉鍖�' }, ] if (isApp) { @@ -98,34 +116,38 @@ } else { appMenus = [] } - - if (appType === 'mob') { - opentypes = opentypes.filter(item => ['pop', 'prompt', 'exec', 'innerpage', 'funcbutton'].includes(item.value)) - funTypes = [ - { value: 'scan', text: '鎵爜' }, - { value: 'logout', text: '閫�鍑�' }, - { 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: '閾炬帴' } - ] - } 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') - } + } + if (appType === 'mob') { + opentypes = opentypes.filter(item => ['pop', 'prompt', 'exec', 'innerpage', 'funcbutton'].includes(item.value)) + funTypes = [ + { 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: 'copyurl', 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: 'refund', text: '閫�娆�' }, + { value: 'changeuser', text: '鍒囨崲鐢ㄦ埛' }, + ] + pageTemps = [ + { value: 'linkpage', text: '鍏宠仈鑿滃崟' }, + { value: 'billprint', text: '鍗曟嵁鎵撳嵃' }, + { value: 'pay', text: Formdict['model.pay'] }, + { value: 'custom', text: '閾炬帴' } + ] } if (type === 'chart' && appType !== 'mob') { @@ -136,9 +158,40 @@ if (viewType === 'popview') { // 寮圭獥鏍囩 opentypes = opentypes.filter(item => item.value !== 'popview' && item.value !== 'funcbutton') refresh.push({ - value: 'popclose', - text: '鏍囩鍒锋柊' + value: 'closepoptab', // 鍏抽棴寮圭獥鏍囩 + text: '鍏抽棴寮圭獥' }) + refresh.push({ + value: 'popclose', // 鎵ц寮圭獥鍏抽棴鏃剁殑鍒锋柊 + text: '鍒锋柊婧愮粍浠�' + }) + } + + if (type === 'card') { + opentypes.push({ + value: 'form', + text: '琛ㄥ崟锛堝紑鍏虫垨鍕鹃�夋锛�' + }) + } + + 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) { + closetab = [{ + value: 'closetab', + text: '鍏抽棴鏍囩' + }] } let forms = [ @@ -151,12 +204,43 @@ options: opentypes }, { + type: 'text', + key: 'label', + label: '鎸夐挳鍚嶇О', + initVal: card.label, + required: true, + }, + { type: 'select', key: 'funcType', - label: Formdict['header.form.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: 'radio', + key: 'formType', + label: '琛ㄥ崟绫诲瀷', + initVal: card.formType || 'switch', + required: true, + options: [{ + value: 'switch', + text: '寮�鍏�' + }, { + value: 'radio', + text: '鍕鹃�夋' + }] }, { type: 'select', @@ -184,18 +268,24 @@ options: [] }, { - type: 'text', - key: 'label', - label: '鎸夐挳鍚嶇О', - initVal: card.label, + type: 'checkbox', + key: 'payType', + label: '鏀粯鏂瑰紡', + initVal: card.payType || [], required: true, - readonly: false + options: [{ + value: 'wxpay', + text: '寰俊' + }, { + value: 'alipay', + text: '鏀粯瀹�' + }] }, { type: 'radio', key: 'procMode', label: '鍙傛暟澶勭悊', - initVal: card.procMode || 'system', + initVal: card.procMode || (card.innerFunc ? 'inner' : 'system'), required: true, options: [{ value: 'system', @@ -203,6 +293,9 @@ }, { value: 'inner', text: '鍐呴儴鍑芥暟' + }, { + value: 'none', + text: '鏃�' }] }, { @@ -227,7 +320,14 @@ initVal: card.innerFunc || '', tooltip: functip, fields: usefulFields, - tooltipClass: 'middle', + required: false, + }, + { + type: 'text', + key: 'urlkey', + label: '鍦板潃瀛楁', + initVal: card.urlkey || '', + tooltip: '鍥剧墖锛堟枃浠讹級閾炬帴鐨勫瓧娈靛悕銆�', required: false, readonly: false }, @@ -241,12 +341,20 @@ }, { type: 'select', + key: 'printTemp', + label: '鎵撳嵃妯℃澘', + initVal: card.printTemp || '', + required: true, + options: printTemps + }, + { + 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 }, { type: 'textarea', @@ -275,7 +383,6 @@ label: Formdict['header.form.outerFunc'], initVal: card.outerFunc || '', required: false, - readonly: false }, { type: 'textarea', @@ -326,7 +433,7 @@ type: 'radio', key: 'callbackType', label: '鍥炶皟鏂瑰紡', - initVal: card.callbackType || 'script', + initVal: card.callbackType || (card.callbackFunc ? 'func' : 'none'), tooltip: '浣跨敤鍚庡彴鑴氭湰鎵ц鏃讹紝闇�瑕侀厤鍚堣鍒掍换鍔°��', required: true, options: [{ @@ -335,6 +442,12 @@ }, { value: 'default', text: '鍚庡彴鑴氭湰' + }, { + value: 'func', + text: '鍥炶皟鍑芥暟' + }, { + value: 'none', + text: '鏃�' }] }, { @@ -349,47 +462,37 @@ key: 'callbackFunc', label: Formdict['header.form.callbackFunc'], initVal: card.callbackFunc || '', - required: false, - readonly: false + required: true }, { type: 'select', key: 'Ot', label: Formdict['header.form.isRequired'], - initVal: card.Ot || 'requiredSgl', + 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 ? '鎵ц鏍囩鍒锋柊鏃讹紝浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '鍒锋柊涓婄骇缁勪欢-琛屾椂锛屼細鍚屾鍒锋柊褰撳墠缁勪欢锛屾敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆�', + initVal: card.execSuccess || 'grid', + tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍笺�傛敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆�', required: true, options: [{ value: 'never', text: Formdict['header.form.refresh.never'] + }, { + value: 'line', + text: '鍒锋柊琛�' }, { value: 'grid', text: '鍒锋柊褰撳墠缁勪欢' }, { value: 'mainline', text: '鍒锋柊涓婄骇缁勪欢 - 琛�' - }, { - value: !appType ? 'closetab' : 'goback', - text: !appType ? '鍏抽棴鏍囩' : '杩斿洖锛堜笂涓�涓〉闈級' - }, + }, + ...closetab, ...refresh] }, { @@ -397,11 +500,14 @@ key: 'execError', label: Formdict['model.form.afterError'], initVal: card.execError || 'never', - tooltip: refresh.length ? '鎵ц鏍囩鍏抽棴鍒锋柊鏃讹紝浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '鍒锋柊涓婄骇缁勪欢-琛屾椂锛屼細鍚屾鍒锋柊褰撳墠缁勪欢锛屾敞锛氫笂绾х粍浠跺湪鏁版嵁婧愪腑娣诲姞銆�', + tooltip: refresh.length ? '鎵ц鍒锋柊婧愮粍浠舵椂锛岃鍦ㄦ簮鎸夐挳涓缃叧闂悗鍒锋柊閭d竴椤癸紝娉細姝ゆ椂浼氬悓姝ュ埛鏂板綋鍓嶇粍浠跺拰涓婄骇缁勪欢-琛屻��' : '閫夋嫨鍒锋柊琛屾椂锛屽鏋滈�夋嫨澶氭潯鏁版嵁浼氬埛鏂拌〃鏍硷紝娉細涓婄骇缁勪欢鍦ㄦ暟鎹簮涓坊鍔犮��', required: true, options: [{ value: 'never', text: Formdict['header.form.refresh.never'] + }, { + value: 'line', + text: '鍒锋柊琛�' }, { value: 'grid', text: '鍒锋柊褰撳墠缁勪欢' @@ -460,6 +566,7 @@ label: '鏄剧ず涓�', initVal: card.show || 'button', required: true, + forbid: type === 'datacard' && appType === 'mob', // 绉诲姩绔紝婊戝姩鏄剧ず鐨勬寜閽彧鏄剧ず鏂囧瓧 options: [{ value: 'icon', text: '鍥炬爣' @@ -475,13 +582,13 @@ type: 'radio', key: 'swipe', label: "婊戝姩鏄剧ず", - initVal: card.swipe || 'false', + initVal: card.swipe === 'false' ? 'left' : (card.swipe || 'left'), // 绉诲姩绔粎淇濈暀婊戝姩鏄剧ず鎸夐挳 required: false, forbid: (type !== 'datacard' || appType !== 'mob'), options: [{ - value: 'false', - text: '鍚�' - }, { + // value: 'false', + // text: '鍚�' + // }, { value: 'left', text: '宸︽粦' }, { @@ -495,6 +602,7 @@ label: Formdict['model.icon'], initVal: card.icon, required: false, + forbid: type === 'datacard' && appType === 'mob', // 绉诲姩绔紝婊戝姩鏄剧ず鐨勬寜閽彧鏄剧ず鏂囧瓧 options: [] }, { @@ -504,7 +612,32 @@ initVal: card.class, tooltip: '姝ら鑹蹭负鎸夐挳鍒濆鍖栭鑹诧紝鍙湪鏍峰紡璋冩暣涓慨鏀广��', required: false, - options: [] + forbid: type === 'datacard' && appType === 'mob', // 绉诲姩绔紝婊戝姩鏄剧ず鐨勬寜閽笉璁剧疆閫氱敤棰滆壊 + options: btnCustomClasses + }, + { + type: 'radio', + key: 'color', + label: Formdict['model.form.color'], + 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: '鐏�' + }] }, { type: 'radio', @@ -530,7 +663,7 @@ { type: 'radio', key: 'pagination', - label: Formdict['header.form.pagination'], + label: '鍒嗛〉', initVal: card.pagination || 'false', required: false, options: [{ @@ -560,7 +693,7 @@ key: 'syncComponent', label: '鍒锋柊缁勪欢', initVal: card.syncComponent || [], - tooltip: '鎵ц鎴愬姛鍚庯紝闇�瑕佸悓姝ュ埛鏂扮殑缁勪欢', + tooltip: '鎵ц鎴愬姛鍚庯紙鎴栧脊绐楁爣绛惧叧闂椂锛夛紝闇�瑕佸悓姝ュ埛鏂扮殑缁勪欢銆傛敞锛氶�夋嫨褰撳墠缁勪欢鐨勪笂绾х粍浠舵棤鏁堬紝鍒锋柊涓婄骇缁勪欢璇烽�夋嫨鎴愬姛鍚庘�滃埛鏂颁笂绾х粍浠� - 琛屸�濄��', required: false, options: modules }, @@ -569,9 +702,18 @@ key: 'switchTab', label: '鍒囨崲鏍囩', initVal: card.switchTab || [], - tooltip: '鎵ц鎴愬姛鍚庯紝闇�瑕佸垏鎹㈢殑鏍囩椤�', + tooltip: '鎵ц鎴愬姛鍚庯紝闇�瑕佸垏鎹㈢殑鏍囩椤点��' + (appType === 'mob' ? '娉細灏忕▼搴忎腑鏃犳晥' : ''), required: false, options: tabs + }, + { + type: 'cascader', + key: 'anchors', + label: '璺宠浆閿氱偣', + initVal: card.anchors || [], + tooltip: '鎵ц鎴愬姛鍚庯紝闇�瑕佽烦杞殑閿氱偣銆�' + (appType === 'mob' ? '娉細灏忕▼搴忎腑鏃犳晥' : ''), + required: false, + options: anchors }, { type: 'cascader', @@ -584,66 +726,46 @@ 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: 'cascader', - key: 'linkmenu', - label: Formdict['model.form.linkmenu'], - initVal: card.linkmenu || [], - required: true, - forbid: isApp, - options: menulist - }, - { type: !appType ? 'cascader' : 'select', key: 'openmenu', label: '鎵撳紑鑿滃崟', tooltip: '鎵ц鎴愬姛鍚庨渶瑕佹墦寮�鐨勮彍鍗曘��', initVal: card.openmenu || (!appType ? [] : ''), + help: appType === 'mob' || appType === 'pc' ? '鍙繑鍥炰笂涓�椤点��' : null, required: false, allowClear: true, - options: appType === 'mob' ? [...appMenus, {value: 'goback', text: '杩斿洖'}] : (appType === 'pc' ? appMenus : menulist), + options: appType === 'mob' || appType === 'pc' ? [...appMenus, {value: 'goback', text: '杩斿洖锛堜笂涓�椤碉級'}] : menulist, forbid: viewType === 'popview' }, { type: 'text', key: 'output', label: '杩斿洖鍊�', - tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺��', + tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺�傜郴缁熷嚱鏁板彲鎸囧畾杩斿洖鐨勫彉閲忥紙浠绗﹀紑澶达紝濡侤id锛夛紱鑷畾涔夊嚱鏁板彲鎸囧畾杩斿洖瀛楁锛堝id锛夈��', initVal: card.output || '', required: false, forbid: viewType === 'popview' + }, + { + type: 'text', + key: 'tipTitle', + label: '纭鎻愮ず', + initVal: card.tipTitle || '', + tooltip: '娉細寮圭獥锛堣〃鍗曪級鍦ㄦ樉绀轰负鏄惁妗嗘椂鏈夋晥銆�', + required: false }, { type: 'radio', key: 'open', label: '鎵撳紑鏂瑰紡', initVal: card.open || 'blank', + tooltip: '鑿滃崟鎵撳紑鏂瑰紡銆�', required: true, - forbid: appType !== 'pc', - options: [{ - value: 'blank', - text: '鏂扮獥鍙�' - }, { - value: 'self', - text: '褰撳墠绐楀彛' - }] + forbid: appType !== 'pc' && appType !== 'mob', + options: [ + {value: 'blank', text: appType !== 'mob' ? '鏂扮獥鍙�' : '鏂伴〉闈�'}, + {value: 'self', text: appType !== 'mob' ? '褰撳墠绐楀彛' : '褰撳墠椤甸潰'}, + ] }, { type: 'radio', @@ -663,11 +785,11 @@ 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 }, { @@ -675,7 +797,6 @@ key: 'placement', label: '鎶藉眽鏂瑰悜', initVal: card.placement || 'right', - tooltip: '浣跨敤鎶藉眽鏃舵湁鏁堛��', required: false, options: [{ value: 'right', @@ -693,10 +814,24 @@ }, { type: 'radio', + key: 'clickouter', + label: '鐐瑰嚮钂欏眰', + initVal: card.clickouter || 'unclose', + required: false, + options: [{ + value: 'unclose', + text: '涓嶅叧闂�' + }, { + value: 'close', + text: '鍏抽棴' + }] + }, + { + type: 'radio', key: 'reload', - label: '杩斿洖鍚�', + label: '涓婁竴椤�', initVal: card.reload || 'false', - tooltip: '鎸夐挳鎴愬姛鍚庤繑鍥炰笂涓�椤甸潰鎴栦娇鐢ㄥ姛鑳芥寜閽�-杩斿洖鍔熻兘鏃讹紝杩斿洖鍚庢槸鍚﹀埛鏂版暟鎹�傛敞锛氬湪鏄庣浜慳pp涓紙搴旂敤妯″紡涓篴pp锛夋湁鏁堛��', + tooltip: '鎴愬姛鍚庢槸鍚﹀埛鏂颁笂椤电殑鏁版嵁銆傛敞锛氬湪鏄庣浜慉PP鎴栧皬绋嬪簭涓湁鏁堛��', forbid: appType !== 'mob', options: [{ value: 'false', @@ -706,6 +841,156 @@ text: '鍒锋柊' }] }, + { + type: 'radio', + key: 'position', + label: '鏄剧ず浣嶇疆', + initVal: card.position || 'middle', + tooltip: '娉細寮圭獥锛堣〃鍗曪級鍦ㄦ樉绀轰负鏄惁妗嗘椂鏈夋晥銆�', + required: false, + forbid: appType !== 'mob', + options: [{ + value: 'middle', + text: '涓儴' + }, { + value: 'bottom', + 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: 'splitLine', + key: 'title', + label: '琛ㄥ崟', + initVal: '' + }, + { + type: 'text', + key: 'field', + label: Formdict['model.form.field'], + 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: 'text', + key: 'openVal', + label: '寮�鍚��', + initVal: card.openVal === undefined ? '' : card.openVal + '', + tooltip: '褰撳紑鍚笌鍏抽棴鍊煎潎涓烘鏁存暟鏃讹紝榛樿杞崲涓篒NT绫诲瀷銆�', + required: false + }, + { + 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: 'hidden', + label: '闅愯棌', + initVal: card.hidden || 'false', + tooltip: '闅愯棌鍚庢寜閽湪椤甸潰涓笉鏄剧ず锛屼笖涓嶅弬涓庢潈闄愬垎閰嶃��', + required: false, + options: [{ + value: 'false', + text: '鍚�' + }, { + value: 'true', + text: '鏄�' + }] + }, + { + type: 'radio', + key: 'progress', + label: '杩涘害鎻愮ず', + initVal: card.progress || 'number', + required: false, + forbid: appType === 'mob', + options: [{ + value: 'number', + text: '鍓╀綑鏁�' + }, { + value: 'progressbar', + text: '杩涘害鏉�' + }] + } ] return forms -- Gitblit v1.8.0