From 49f09cc6f8ff8c30a75ed1a9d6f510b69b73962a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 12 十二月 2023 21:05:37 +0800 Subject: [PATCH] 2023-12-12 --- src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx | 663 +++++++++++++++++++++++++++++++++++++------------------ 1 files changed, 446 insertions(+), 217 deletions(-) diff --git a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx index 4b38458..e89781e 100644 --- a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx @@ -1,131 +1,218 @@ -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 - /** * @description 鑾峰彇鍥捐〃瑙嗗浘閰嶇疆琛ㄥ崟 * @param {object} card // 鍥捐〃瀵硅薄 */ -export function getBaseForm (card) { - // let appType = sessionStorage.getItem('appType') - // let menulist = null - - // if (appType === 'pc') { - // menulist = sessionStorage.getItem('appMenus') - // if (Array.isArray(card.linkmenu)) { - // card.linkmenu = '' - // } - // } else { - // menulist = sessionStorage.getItem('fstMenuList') - // } - - // if (menulist) { - // try { - // menulist = JSON.parse(menulist) - // if (appType === 'pc') { - // menulist = menulist.map(item => { - // item.value = item.MenuID - // item.text = item.MenuName - // return item - // }) - // } - // } catch { - // menulist = [] - // } - // } else { - // menulist = [] - // } - +export function getBaseForm (card, columns = []) { + let appType = sessionStorage.getItem('appType') let roleList = sessionStorage.getItem('sysRoles') + let isprint = sessionStorage.getItem('MenuType') === 'billPrint' + let ispop = sessionStorage.getItem('editMenuType') === 'popview' if (roleList) { try { roleList = JSON.parse(roleList) - } catch { + } catch (e) { roleList = [] } } else { roleList = [] } + let menulist = [] + + if (appType === 'pc') { + menulist = sessionStorage.getItem('appMenus') + if (menulist) { + try { + menulist = JSON.parse(menulist) + } catch (e) { + menulist = [] + } + } else { + menulist = [] + } + } else if (appType === '') { + menulist = sessionStorage.getItem('fstMenuList') + if (menulist) { + try { + menulist = JSON.parse(menulist) + } catch (e) { + menulist = [] + } + } else { + menulist = [] + } + } + return [ { type: 'text', - key: 'title', + field: 'title', label: '鏍囬', - initVal: card.title, + initval: card.title, required: false }, { type: 'text', - key: 'name', + field: 'name', label: '缁勪欢鍚嶇О', - initVal: card.name, + initval: card.name, tooltip: '鐢ㄤ簬缁勪欢闂寸殑鍖哄垎銆�', required: true }, { type: 'number', - key: 'width', + field: 'width', label: '瀹藉害', - initVal: card.width, + initval: card.width, tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��', min: 1, max: 24, - decimal: 0, + precision: 0, required: true }, { - type: 'number', - key: 'height', - label: '楂樺害', - initVal: card.height, - min: 100, - max: 1000, - decimal: 0, - required: true + type: 'styleInput', + field: 'height', + label: '鍥捐〃楂樺害', + initval: card.height, + tooltip: '鍥捐〃缁樺浘鍖哄煙鐨勯珮搴︼紝涓嶅寘鎷爣棰樺強鍐呭杈硅窛銆�', + required: true, + options: ['px', 'vh', 'vw'] + }, + { + type: 'radio', + field: 'permission', + label: '鏉冮檺楠岃瘉', + initval: card.permission || 'false', + required: false, + options: [ + {value: 'true', label: '鍚敤'}, + {value: 'false', label: '绂佺敤'}, + ], + forbid: !appType || ispop || isprint + }, + { + type: 'radio', + field: 'cacheLocal', + label: '鏈湴缂撳瓨', + initval: card.cacheLocal || 'true', + required: false, + options: [ + {value: 'true', label: '缁ф壙鑿滃崟'}, + {value: 'false', label: '绂佺敤'}, + ], + forbid: ispop || isprint + }, + { + type: 'multiselect', + field: 'blacklist', + label: '榛戝悕鍗�', + initval: card.blacklist || [], + required: false, + options: roleList, + forbid: !!appType || isprint + }, + { + type: 'radio', + field: 'click', + label: '鐐瑰嚮浜嬩欢', + initval: card.click || '', + tooltip: '鐐瑰嚮鏌卞瓙鏃惰Е鍙戠殑浜嬩欢锛屽惎鐢ㄨ嚜瀹氫箟璁剧疆鏃舵棤鏁堛��', + required: false, + forbid: appType === 'mob' || card.chartType !== 'bar', + options: [ + {value: '', label: '鏁版嵁鍒囨崲'}, + {value: 'menu', label: '鑿滃崟'}, + {value: 'menus', label: '鑿滃崟缁�'} + ], + controlFields: [ + {field: 'menu', values: ['menu']}, + {field: 'open', values: ['menu', 'menus']}, + {field: 'joint', values: ['menu', 'menus']}, + {field: 'menuType', values: ['menus']}, + {field: 'menus', values: ['menus']}, + ] + }, + { + type: appType === '' ? 'cascader' : 'select', + field: 'menu', + label: '鍏宠仈鑿滃崟', + initval: card.menu || (appType === '' ? [] : ''), + tooltip: '鍦ㄤ娇鐢ㄦ煴褰㈠浘涓旀湭鍚敤鑷畾涔夎缃椂鏈夋晥銆�', + required: true, + forbid: appType === 'mob' || card.chartType !== 'bar', + hidden: card.click !== 'menu', + options: menulist }, { type: 'select', - key: 'blacklist', - label: '榛戝悕鍗�', - initVal: card.blacklist || [], - multi: true, - required: false, - options: roleList + field: 'menuType', + label: '鑿滃崟绫诲瀷', + initval: card.menuType || '', + required: true, + forbid: appType === 'mob' || card.chartType !== 'bar', + hidden: card.click !== 'menus', + options: columns, }, - // { - // type: 'cascader', - // key: 'linkmenu', - // label: '鍏宠仈鑿滃崟', - // initVal: card.linkmenu || [], - // tooltip: '鍦ㄤ娇鐢ㄦ煴褰㈠浘涓旀湭鍚敤鑷畾涔夎缃椂鏈夋晥銆�', - // required: false, - // forbid: appType === 'pc' || appType === 'mob', - // options: menulist - // }, - // { - // type: 'select', - // key: 'linkmenu', - // label: '鍏宠仈鑿滃崟', - // initVal: card.linkmenu || '', - // tooltip: '鍙屽嚮鏌辩姸鍥撅紝浼氭墦寮�鍏宠仈鐨勮彍鍗曘��', - // required: false, - // forbid: appType !== 'pc', - // options: menulist - // }, - // { - // type: 'radio', - // key: 'open', - // label: '鎵撳紑鏂瑰紡', - // initVal: card.open || 'blank', - // required: false, - // forbid: appType !== 'pc', - // options: [ - // { value: 'blank', text: '鏂扮獥鍙�' }, - // { value: 'self', text: '褰撳墠绐楀彛' } - // ] - // } + { + type: 'radio', + field: 'open', + label: '鎵撳紑鏂瑰紡', + initval: card.open || 'blank', + required: false, + options: [ + {value: 'blank', label: '鏂扮獥鍙�'}, + {value: 'self', label: '褰撳墠绐楀彛'}, + ], + forbid: appType !== 'pc' || card.chartType !== 'bar', + hidden: card.click !== 'menu' && card.click !== 'menus' + }, + { + type: 'radio', + field: 'joint', + label: '鍙傛暟鎷兼帴', + initval: card.joint || 'true', + required: false, + options: [ + {value: 'true', label: '鏄�'}, + {value: 'false', label: '鍚�'}, + ], + forbid: appType === 'mob' || card.chartType !== 'bar', + hidden: card.click !== 'menu' && card.click !== 'menus' + }, + { + type: 'table', + field: 'menus', + label: '鑿滃崟缁�', + initval: card.menus || [], + required: true, + span: 24, + actions: ['view'], + forbid: appType === 'mob' || card.chartType !== 'bar', + hidden: card.click !== 'menus', + columns: [ + { + title: '鏍囪瘑', + dataIndex: 'sign', + inputType: 'input', + editable: true, + unique: true, + required: false, + width: '35%' + }, + { + title: '鑿滃崟', + dataIndex: 'menu', + inputType: !appType ? 'cascader' : 'select', + editable: true, + required: true, + extends: !appType ? 'Menu' : [{key: 'label', value: 'label'}], + width: '35%', + render: (text, record) => record.label, + options: menulist + } + ] + } ] } @@ -140,23 +227,24 @@ if (card.chartType === 'line') { shapes = [ - { field: 'smooth', label: 'smooth' }, - { field: 'line', label: 'line' }, - { field: 'dot', label: 'dot' }, - { field: 'dash', label: 'dash' }, - { field: 'hv', label: 'hv' }, - { field: 'vh', label: 'vh' }, - { field: 'hvh', label: 'hvh' }, - { field: 'vhv', label: 'vhv' } + { field: 'smooth', label: 'smooth锛堝钩婊戠嚎锛�' }, + { field: 'line', label: 'line锛堢洿绾匡級' }, + { field: 'dot', label: 'dot锛堢偣鐘剁嚎锛�' }, + { field: 'dash', label: 'dash锛堣櫄绾匡級' }, + { field: 'hv', label: 'hv锛堟按骞�-鍨傜洿绾匡級' }, + { field: 'vh', label: 'vh锛堝瀭鐩�-姘村钩绾匡級' }, + { field: 'hvh', label: 'hvh锛堟按骞�-鍨傜洿-姘村钩绾匡級' }, + { field: 'vhv', label: 'vhv锛堝瀭鐩�-姘村钩-鍨傜洿绾匡級' } ] } else if (card.chartType === 'bar') { shapes = [ - { field: 'rect', label: 'rect' }, - { field: 'hollow-rect', label: 'hollow-rect' }, - { field: 'line', label: 'line' }, - { field: 'tick', label: 'tick' }, - { field: 'funnel', label: 'funnel' }, - { field: 'pyramid', label: 'pyramid' } + { field: 'rect', label: 'rect锛堢煩褰級' }, + { field: 'hollow-rect', label: 'hollow-rect锛堢┖蹇冪煩褰級' }, + // { field: 'hollow', label: 'hollow锛堢┖蹇冪煩褰級' }, + // { field: 'line', label: 'line锛堢嚎鏉★級' }, + // { field: 'tick', label: 'tick锛堟尝鍔級' }, + // { field: 'funnel', label: 'funnel锛堟紡鏂楀浘锛�' }, + { field: 'pyramid', label: 'pyramid锛堥噾瀛楀锛�' } ] } @@ -165,66 +253,92 @@ let labelOptions = [{ value: 'false', - text: '闅愯棌' + label: '闅愯棌' }, { value: 'true', - text: '鏄剧ず' + label: '鏄剧ず' }] if (card.chartType === 'bar') { - labelOptions[1].text = '澶栭儴' + labelOptions[1].label = '澶栭儴' labelOptions.push(...[{ value: 'top', - text: '椤堕儴' + label: '椤堕儴' }, { value: 'middle', - text: '涓棿' + label: '涓棿' }, { value: 'bottom', - text: '搴曢儴' + label: '搴曢儴' }]) + } + + let axis = [] + if (card.grid !== 'hidden') { + axis.push('grid') + } + if (card.x_line !== 'hidden') { + axis.push('x_line') + } + if (card.y_line !== 'hidden') { + axis.push('y_line') + } + if (card.tick !== 'hidden') { + axis.push('tick') + } + + let tickVals = [] + if (card.x_label !== 'hidden') { + tickVals.push('x_label') + } + if (card.y_label !== 'hidden') { + tickVals.push('y_label') } return [ { type: 'radio', - key: 'datatype', + field: 'datatype', label: '鏁版嵁绫诲瀷', - initVal: card.datatype || 'query', + initval: card.datatype || 'query', tooltip: '缁熻鍥捐〃閫傜敤浜庡睍绀烘暟鎹被鍨嬩负鍔ㄦ�佸�笺��', required: false, + $trans: true, options: [ - { value: 'query', text: Formdict['header.form.query'] }, - { value: 'statistics', text: Formdict['header.form.statistics'] } + { value: 'query', label: '鏌ヨ' }, + { value: 'statistics', label: '缁熻' } + ], + controlFields: [ + {field: 'InfoType', values: ['statistics']}, + {field: 'InfoValue', values: ['statistics']}, + {field: 'Yaxis', values: ['query']}, ] }, { type: 'select', - key: 'Xaxis', + field: 'Xaxis', label: 'X-杞�', - initVal: card.Xaxis || '', + initval: card.Xaxis || '', required: true, options: xfields }, { type: 'select', - key: 'InfoType', + field: 'InfoType', label: '绫诲瀷', - initVal: card.InfoType || '', - hidden: card.datatype !== 'statistics', + initval: card.InfoType || '', required: true, options: xfields }, { type: 'select', - key: 'InfoValue', + field: 'InfoValue', label: '鍊�', - initVal: card.InfoValue || '', - hidden: card.datatype !== 'statistics', + initval: card.InfoValue || '', required: true, options: yfields }, { type: 'select', - key: 'legend', + field: 'legend', label: '鍥句緥浣嶇疆', - initVal: card.legend || 'bottom', + initval: card.legend || 'bottom', required: false, options: [ { field: 'bottom', label: '涓�' }, @@ -242,222 +356,325 @@ { field: 'hidden', label: '闅愯棌' } ] }, { - type: 'select', - key: 'Yaxis', + type: 'multiselect', + field: 'Yaxis', label: 'Y-杞�', - initVal: card.Yaxis || [], - multi: true, // 澶氶�� - hidden: card.datatype === 'statistics', + initval: card.Yaxis || [], required: true, options: yfields }, { type: 'select', - key: 'shape', + field: 'shape', label: '褰㈢姸', - initVal: card.shape || (shapes[0] && shapes[0].field), + initval: card.shape || (shapes[0] && shapes[0].field), required: false, options: shapes }, { type: 'radio', - key: 'tooltip', + field: 'tooltip', label: '鎮诞鎻愮ず', - initVal: card.tooltip || 'true', + initval: card.tooltip || 'true', required: false, options: [{ value: 'true', - text: '鏄剧ず' + label: '鏄剧ず' }, { value: 'false', - text: '闅愯棌' + label: '闅愯棌' }] }, { type: 'radio', - key: 'point', + field: 'point', label: '鐐瑰浘', - initVal: card.point || 'false', + initval: card.point || 'false', required: false, forbid: !['line'].includes(card.chartType), options: [{ value: 'true', - text: '鏄剧ず' + label: '鏄剧ず' }, { value: 'false', - text: '闅愯棌' + label: '闅愯棌' }] }, { type: 'radio', - key: 'transpose', + field: 'transpose', label: '鍙樻崲', - initVal: card.transpose || 'false', + initval: card.transpose || 'false', tooltip: '妯旱鍧愭爣杞翠氦鎹�', + forbid: card.chartType === 'line', required: false, options: [{ value: 'true', - text: Formdict['model.true'] + label: '鏄�' }, { value: 'false', - text: Formdict['model.false'] + label: '鍚�' }] }, { type: 'radio', - key: 'show', - label: '鏍煎紡鍖�', - initVal: card.show || 'value', + field: 'show', + label: '鏄剧ず', + initval: card.show || 'value', + tooltip: '褰撲娇鐢ㄨ嚜瀹氫箟璁剧疆鏃讹紝鍙湪鏄剧ず锛堝��/%锛夊鍗曠嫭璁剧疆鏄剧ず绫诲瀷銆傛敞锛氳嚜瀹氫箟涓虹┖鏃朵娇鐢ㄦ澶勮缃��', required: false, options: [{ value: 'value', - text: '鏃�' + label: '鏁板��' }, { value: 'percent', - text: '鐧惧垎姣�' + label: '鐧惧垎姣�' + }, { + value: 'thdSeparator', + label: '鍗冨垎浣�' }] }, { - type: labelOptions.length > 2 ? 'select' : 'radio', - key: 'label', - label: '鏍囩', - initVal: card.label || 'false', + type: 'radio', + field: 'label', + label: '鏍囨敞', + initval: card.label || 'false', + tooltip: '鍥惧舰鑺傜偣澶勭殑鏁板�笺��', required: false, - options: labelOptions + options: labelOptions, + controlFields: [ + {field: 'labelColor', values: ['true']} + ] }, { type: 'radio', - key: 'labelColor', - label: '鏍囩棰滆壊', - initVal: card.labelColor || 'system', + field: 'labelColor', + label: '鏍囨敞棰滆壊', + initval: card.labelColor || 'system', tooltip: '浣跨敤绯荤粺鑹叉椂锛屼娇鐢ㄨ壊绯婚�夐」璁剧疆鐨勭郴缁熼鑹诧紝浣跨敤鑷畾涔変负棰滆壊璁剧疆涓畾涔夌殑鍥惧舰棰滆壊銆�', required: false, options: [{ value: 'system', - text: '绯荤粺' + label: '绯荤粺' }, { value: 'custom', - text: '鑷畾涔�' + label: '鑷畾涔�' }] // }, { // type: 'radio', - // key: 'offset', - // label: '鏍囨敞浣嶇疆', - // initVal: card.offset || 'outer', + // field: 'labelValue', + // label: '鏍囨敞鍊�', + // initval: card.labelValue || 'default', + // tooltip: '鏍囨敞鍊肩殑鏄剧ず瑙勫垯銆�', // required: false, // options: [{ - // value: 'outer', - // text: '澶栭儴' + // value: 'default', + // label: '榛樿' // }, { - // value: 'inner', - // text: '鍐呴儴' + // value: 'zero', + // label: '闅愯棌 0 鍊�' // }], - // forbid: card.chartType !== 'bar' }, { type: 'radio', - key: 'adjust', + field: 'adjust', label: '澶氭煴鎺掑垪', - initVal: card.adjust || 'dodge', + initval: card.adjust || 'dodge', required: false, forbid: !['bar'].includes(card.chartType), options: [{ value: 'dodge', - text: '鍒嗙粍' + label: '鍒嗙粍' }, { value: 'stack', - text: '鍫嗗彔' + label: '鍫嗗彔' }] }, { type: 'radio', - key: 'area', + field: 'area', label: '闈㈢Н鍥�', - initVal: card.area || 'false', + initval: card.area || 'false', required: false, forbid: ['bar'].includes(card.chartType), options: [{ value: 'true', - text: '鏄剧ず' + label: '鏄剧ず' }, { value: 'false', - text: '涓嶆樉绀�' + label: '涓嶆樉绀�' }] }, { type: 'radio', - key: 'repeat', - label: '閲嶅鏁版嵁', - initVal: card.repeat || 'unrepeat', - required: false, - options: [{ - value: 'unrepeat', - text: '鍘婚噸' - }, { - value: 'average', - text: '骞冲潎' - }, { - value: 'cumsum', - text: '绱姞' - }] - }, { - type: 'radio', - key: 'coordinate', + field: 'coordinate', label: '鍧愭爣', - initVal: card.coordinate || 'angle', + initval: card.coordinate || 'angle', required: false, + forbid: card.chartType === 'line', options: [{ value: 'angle', - text: '浜岀淮鍧愭爣' + label: '浜岀淮鍧愭爣' }, { value: 'polar', - text: '鏋佸潗鏍�' + label: '鏋佸潗鏍�' }] }, { + type: 'checkbox', + field: 'axis', + label: '鍧愭爣杞�', + initval: axis, + required: false, + options: [{ + value: 'grid', + label: '缃戞牸绾�' + }, { + value: 'x_line', + label: 'X杞�' + }, { + value: 'y_line', + label: 'Y杞�' + }, { + value: 'tick', + label: '鍒诲害绾�' + }], + controlFields: [ + {field: 'lineColor', notNull: true}, + ] + }, { + type: 'checkbox', + field: 'tickVals', + label: '鍒诲害鍊�', + initval: tickVals, + required: false, + options: [{ + value: 'x_label', + label: 'X杞�' + }, { + value: 'y_label', + label: 'Y杞�' + }], + controlFields: [ + {field: 'color', notNull: true}, + ] + // }, { + // type: 'radio', + // field: 'grid', + // label: '缃戞牸绾�', + // initval: card.grid || 'show', + // required: false, + // options: [{ + // value: 'show', + // label: '鏄剧ず' + // }, { + // value: 'hidden', + // label: '闅愯棌' + // }] + // }, { + // type: 'radio', + // field: 'y_line', + // label: 'y杞磋竟绾�', + // initval: card.y_line || 'hidden', + // tooltip: '鍥惧舰宸︿晶鎴栧彸渚х殑杈圭嚎銆�', + // required: false, + // options: [{ + // value: 'show', + // label: '鏄剧ず' + // }, { + // value: 'hidden', + // label: '闅愯棌' + // }] + }, { + type: 'radio', + field: 'download', + label: '瀵煎嚭鍥剧墖', + initval: card.download || 'forbid', + required: false, + forbid: appType === 'mob', + options: [{ + value: 'forbid', + label: '绂佺敤' + }, { + value: 'enable', + label: '鍚敤' + }] + }, { + type: 'radio', + field: 'empty', + label: '绌哄�奸殣钘�', + initval: card.empty || 'show', + tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛岄殣钘忚缁勪欢銆�', + required: false, + options: [ + {value: 'show', label: '鍚�'}, + {value: 'hidden', label: '鏄�'}, + ], + }, { type: 'number', - key: 'barSize', + field: 'barSize', label: '鏌卞舰瀹藉害', tooltip: '绌哄�兼椂锛屽搴﹁嚜閫傚簲銆�', min: 5, - max: 100, - decimal: 0, - initVal: card.barSize, + max: 200, + precision: 0, + initval: card.barSize, forbid: !['bar'].includes(card.chartType), required: false }, { type: 'number', - key: 'barRadius', + field: 'barRadius', label: '鏌卞舰鍦嗚', tooltip: '鏌卞舰鍥句笂绔渾瑙掋��', min: 0, max: 200, - decimal: 0, - initVal: card.barRadius || 0, + precision: 0, + initval: card.barRadius || 0, forbid: !['bar'].includes(card.chartType), required: false }, { - type: 'color', - key: 'color', - label: '鑹茬郴', - initVal: card.color || 'rgba(0, 0, 0, 0.65)', - tooltip: '鍧愭爣杞存彁绀烘枃瀛楀強绀轰緥鐨勯鑹层��', + type: 'number', + field: 'min', + label: '鏈�灏忓��', + tooltip: 'y杞存渶灏忓�硷紝涓虹┖鏃惰嚜閫傚簲銆�', + initval: card.min, + required: false + }, { + type: 'number', + field: 'max', + label: '鏈�澶у��', + tooltip: 'y杞存渶澶у�硷紝涓虹┖鏃惰嚜閫傚簲銆�', + initval: card.max, + required: false + }, { + type: 'number', + field: 'XLimit', + min: 2, + label: '瀛楃闄愬埗', + tooltip: 'X杞存渶澶у瓧绗﹂檺鍒躲��', + initval: card.XLimit || 11, + forbid: appType === 'mob', required: false }, { type: 'color', - key: 'selectColor', - label: '閫変腑棰滆壊', - initVal: card.selectColor || '', - tooltip: '閫変腑鏌卞舰鍥剧殑棰滆壊锛屽湪浜や簰鏁堟灉銆婂厓绱犻�変腑锛堝閫夛級銆嬪拰銆婂厓绱犻�変腑锛堝崟閫夛級銆嬩腑鏈夋晥锛岃嚜瀹氫箟璁剧疆涓棤鏁堛��', - forbid: !['bar'].includes(card.chartType), + field: 'lineColor', + label: '鍧愭爣杞撮鑹�', + initval: card.lineColor || '', + tooltip: '鍧愭爣杞寸嚎鐨勯鑹诧紝鍖呮嫭x杞淬�亂杞淬�佺綉鏍肩嚎銆佸埢搴︾嚎銆�', + allowClear: true, + required: false + }, { + type: 'color', + field: 'color', + label: '鍒诲害鍊奸鑹�', + initval: card.color || '', allowClear: true, required: false }, { type: 'number', - key: 'rotate', + field: 'rotate', label: '鏃嬭浆', tooltip: '鍧愭爣杞存爣娉ㄦ枃鏈殑鏃嬭浆瑙掑害銆�', min: 0, max: 360, - decimal: 0, - initVal: card.rotate, + precision: 0, + initval: card.rotate, forbid: appType !== 'mob', required: false }, { - type: 'select', - key: 'interaction', + type: 'multiselect', + field: 'interaction', label: '浜や簰鏁堟灉', - initVal: card.interaction || [], - multi: true, + initval: card.interaction || [], required: false, forbid: appType === 'mob', options: [ @@ -473,7 +690,19 @@ { value: 'legend-active', label: '鍥句緥鑱氱劍' }, { value: 'legend-highlight', label: '鍥句緥楂樹寒' }, { value: 'brush', label: '閫夋杩囨护' }, + ], + controlFields: [ + {field: 'selectColor', values: ['element-selected', 'element-single-selected']}, ] + }, { + type: 'color', + field: 'selectColor', + label: '閫変腑棰滆壊', + initval: card.selectColor || '', + tooltip: '閫変腑鏌卞舰鍥剧殑棰滆壊锛屽惎鐢ㄨ嚜瀹氫箟璁剧疆鏃舵棤鏁堛��', + forbid: !['bar'].includes(card.chartType), + allowClear: true, + required: false } ] } -- Gitblit v1.8.0