From dddb2c96f42d9c852dba26ff9a27daa12bd85008 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 14 十月 2021 00:07:20 +0800 Subject: [PATCH] 2021-10-14 --- src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 117 insertions(+), 1 deletions(-) diff --git a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx index 28c9fc9..ff20115 100644 --- a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx +++ b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx @@ -7,7 +7,7 @@ * @description 鑾峰彇鏄剧ず鍒楄〃鍗曢厤缃俊鎭� * @param {object} card // 鎼滅储鏉′欢瀵硅薄 */ -export function getColumnForm (card, fields = []) { +export function getColumnForm (card, fields = [], columns = []) { let roleList = sessionStorage.getItem('sysRoles') if (roleList) { try { @@ -39,9 +39,27 @@ value: 'action', text: '鎿嶄綔' }, { + value: 'formula', + text: '鍏紡' + }, { value: 'index', text: '搴忓彿' }] + + let editCols = [ + { + field: '$next', + label: '涓嬩竴琛�' + } + ] + columns.forEach(col => { + if (col.editable === 'true' && col.uuid !== card.uuid) { + editCols.push({ + field: col.uuid, + label: col.label + }) + } + }) return [ { @@ -125,6 +143,21 @@ }, { type: 'radio', + key: 'sum', + label: '鏄剧ず鍚堣', + initVal: card.sum || 'false', + tooltip: '鍚堣淇℃伅鍙湪浣跨敤绯荤粺鏁版嵁婧愭椂鏈夋晥銆�', + required: false, + options: [{ + value: 'true', + text: Formdict['model.true'] + }, { + value: 'false', + text: Formdict['model.false'] + }] + }, + { + type: 'radio', key: 'editable', label: '鍙紪杈�', initVal: card.editable || 'false', @@ -138,6 +171,52 @@ }] }, { + type: 'radio', + key: 'required', + label: '蹇呭~', + initVal: card.required || 'false', + required: false, + options: [{ + value: 'false', + text: '鍚�' + }, { + value: 'true', + text: '鏄�' + }] + }, + { + type: 'text', + key: 'initval', + label: '榛樿鍊�', + initVal: card.initval, + tooltip: '浣跨敤$copy鏃讹紝琛ㄧず鏂板鏃跺鍒朵笂涓�琛屼俊鎭��', + required: false + }, + { + type: 'select', + key: 'enter', + label: '鍥炶溅鍒囨崲', + initVal: card.enter || '$next', + options: editCols + }, + { + type: 'radio', + key: 'footEnter', + label: '鏈鍥炶溅', + initVal: card.footEnter || 'false', + tooltip: '鏂板鍔熻兘浠呭湪琛ㄦ牸鍙柊澧炴椂鏈夋晥銆�', + options: [{ + value: 'sub', + text: '鎻愪氦' + }, { + value: 'add', + text: '鏂板' + }, { + value: 'false', + text: '鏃犲姩浣�' + }] + }, + { type: 'number', key: 'decimal', min: 0, @@ -146,6 +225,22 @@ label: Formdict['header.form.decimal'], initVal: card.decimal || 0, required: true + }, + { + type: 'number', + key: 'max', + label: '鏈�澶у��', + initVal: card.max, + unlimit: true, + required: false + }, + { + type: 'number', + key: 'min', + label: '鏈�灏忓��', + initVal: card.min, + unlimit: true, + required: false }, { type: 'select', @@ -198,6 +293,27 @@ readonly: false }, { + type: 'radio', + key: 'eval', + label: '瑙f瀽', + initVal: card.eval || 'true', + tooltip: '褰撳叕寮忓唴瀹规秹鍙婅绠楁椂璇烽�夋嫨鈥滄槸鈥濓紝褰撳叕寮忓唴瀹逛负瀛楁鎷兼帴鏃惰閫夋嫨鈥滃惁鈥濄��', + required: false, + options: [ + { value: 'true', text: '鏄�' }, + { value: 'false', text: '鍚�' } + ] + }, + { + type: 'textarea', + key: 'formula', + label: '鍏紡', + initVal: card.formula || '', + tooltip: '鎵ц鏃朵細浣跨敤鏌ヨ鍒扮殑鏁版嵁鏇挎崲鐩稿簲鐨勫瓧娈碉紝灞曠ず鑾峰緱鐨勭粨鏋溿�傚彲浣跨敤JS鐨勪竴浜涜娉曪紝濡傦細涓夊厓琛ㄨ揪寮� @field1@ > @field2@ ? 0 : 1锛汳ath瀵硅薄锛屽彇缁濆鍊� Math.abs(@field@)銆佸洓鑸嶄簲鍏� Math.round(@field@)绛�', + placeholder: '渚嬪锛欯price@ * @number@', + required: true + }, + { type: 'multiselect', key: 'blacklist', label: Formdict['header.form.blacklist'], -- Gitblit v1.8.0