From 32973f90869ff466401759c23681fc06fa65c71a Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 10 六月 2025 23:06:50 +0800
Subject: [PATCH] Merge branch 'master' into positec
---
src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx | 216 +++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 190 insertions(+), 26 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 29ff601..d255dc5 100644
--- a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
+++ b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx
@@ -2,7 +2,7 @@
* @description 鑾峰彇鏄剧ず鍒楄〃鍗曢厤缃俊鎭�
* @param {object} card // 鎼滅储鏉′欢瀵硅薄
*/
-export function getColumnForm (card, fields = [], columns = []) {
+export function getColumnForm (card, fields = [], columns = [], wrap) {
let roleList = sessionStorage.getItem('sysRoles')
if (roleList) {
try {
@@ -37,24 +37,34 @@
value: 'colspan',
text: '鍚堝苟鍒�'
}, {
+ value: 'extend',
+ text: '鎵╁睍鍒�'
+ }, {
value: 'index',
text: '搴忓彿'
}]
let editCols = [
+ // {
+ // field: '$sub',
+ // label: '鎻愪氦'
+ // },
{
- field: '$sub',
- label: '鎻愪氦'
+ field: '$noAct',
+ label: '鏃犲姩浣�'
},
{
field: '$next',
label: '涓嬩竴琛�'
- },
- {
- field: '$noAct',
- label: '鏃犲姩浣�'
}
]
+
+ if (card.enter === '$sub') {
+ card.enter = '$noAct'
+ }
+ if (wrap.commit === 'change') {
+ editCols[0].label = '澶卞幓鐒︾偣'
+ }
let cols = []
let getcols = (columns, suplabel = '') => {
@@ -80,6 +90,21 @@
label: col.label + '锛堜笅涓�琛岋級'
})
})
+
+ editCols.push({
+ field: '$next_' + card.uuid,
+ label: card.label + '锛堜笅涓�琛岋級'
+ })
+
+ if (wrap.commit === 'change') {
+ editCols.push({
+ field: '$noActX',
+ label: '鏃犲姩浣�',
+ disabled: card.editType !== 'select'
+ })
+ } else if (card.enter === '$noActX') {
+ card.enter = '$noAct'
+ }
return [
{
@@ -133,7 +158,7 @@
type: 'radio',
key: 'IsSort',
label: '鎺掑簭',
- initVal: card.IsSort || (card.isSub || card.type === 'custom' ? 'false' : 'true'),
+ initVal: card.IsSort || 'false',
required: true,
options: [{
value: 'true',
@@ -184,6 +209,95 @@
}, {
value: 'right',
text: '鍙冲榻�'
+ }]
+ },
+ {
+ type: 'radio',
+ key: 'colUnit',
+ label: '鍗曚綅',
+ initVal: card.colUnit || 'day',
+ required: true,
+ options: [{
+ value: 'day',
+ text: '澶�'
+ }, {
+ value: 'hour',
+ text: '灏忔椂'
+ }]
+ },
+ {
+ type: 'number',
+ key: 'shift',
+ label: '鍋忕Щ閲�',
+ initVal: card.shift || 0,
+ min: -1000,
+ max: 1000,
+ decimal: 0,
+ required: true
+ },
+ {
+ type: 'number',
+ key: 'quota',
+ label: '鎸囨爣鏁�',
+ initVal: card.quota || 7,
+ min: 1,
+ max: 1000,
+ decimal: 0,
+ required: true
+ },
+ {
+ type: 'select',
+ key: 'dayFormat',
+ label: '鏍煎紡鍖�',
+ initVal: card.dayFormat || 'M/DD',
+ required: true,
+ options: [{
+ value: 'M/DD',
+ label: 'M/DD锛�4/29锛�'
+ }, {
+ value: 'M-DD',
+ label: 'M-DD锛�4-29锛�'
+ }, {
+ value: 'M鏈圖D鏃�',
+ label: 'M鏈圖D鏃ワ紙4鏈�29鏃ワ級'
+ }, {
+ value: 'M/DD week',
+ label: 'M/DD week锛�4/29 鏄熸湡涓�锛�'
+ }, {
+ value: 'M-DD week',
+ label: 'M-DD week锛�4-29 鏄熸湡涓�锛�'
+ }, {
+ value: 'M鏈圖D鏃� week',
+ label: 'M鏈圖D鏃� week锛�4鏈�29鏃� 鏄熸湡涓�锛�'
+ }]
+ },
+ {
+ type: 'select',
+ key: 'hourFormat',
+ label: '鏍煎紡鍖�',
+ initVal: card.hourFormat || 'H:00',
+ required: true,
+ options: [{
+ value: 'H:00',
+ label: 'H:00锛�15:00锛�'
+ }, {
+ value: 'H point',
+ label: 'H锛�15鐐癸級'
+ }, {
+ value: 'h:00',
+ label: 'h:00锛�3:00 pm锛�'
+ }]
+ },
+ {
+ type: 'text',
+ key: 'supField',
+ label: '涓婄骇瀛楁',
+ initVal: card.supField || '',
+ tooltip: '鏉ユ簮浜庝笂绾х粍浠剁殑瀛楁闆嗭紙涓婄骇缁勪欢涓虹┖鏃朵粠url鍙傛暟涓�夊彇锛夛紝璇ュ瓧娈靛�硷紙鐢ㄩ�楀彿鍒嗛殧锛夊彲鎺у埗鎵╁睍鍒楃殑鍒楀悕銆�',
+ required: false,
+ rules: [{
+ pattern: /^[0-9a-zA-Z_]*$/ig,
+ message: '瀛楁鍚嶅彧鍏佽鍖呭惈鏁板瓧銆佸瓧姣嶄互鍙奯'
}]
},
{
@@ -257,6 +371,20 @@
}]
},
{
+ type: 'radio',
+ key: 'required',
+ label: '蹇呭~',
+ initVal: card.required || 'false',
+ required: false,
+ options: [{
+ value: 'false',
+ text: '鍚�'
+ }, {
+ value: 'true',
+ text: '鏄�'
+ }]
+ },
+ {
type: 'text',
key: 'initval',
label: '榛樿鍊�',
@@ -318,7 +446,7 @@
key: 'dataSource',
label: '鏁版嵁婧�',
initVal: card.dataSource || '',
- placeholder: '绯荤粺鍙橀噺锛歮k_departmentcode銆乵k_organization銆乵k_user_type銆傚叕鍏卞�粿BID@銆�',
+ placeholder: '绯荤粺鍙橀噺锛歮k_departmentcode銆乵k_organization銆乵k_user_type銆傚叕鍏卞�硷細@BID@銆丂Appkey@銆丂UserID@銆丂SessionUid@銆丂LoginUID@銆丂lang@銆�',
required: true,
},
{
@@ -419,12 +547,22 @@
},
{
type: 'select',
+ key: 'showField',
+ label: '鏄剧ず瀛楁',
+ initVal: card.showField || '',
+ tooltip: '鐢ㄤ簬鎺у埗鍗曞厓鏍间腑鐨勬樉绀哄唴瀹广��',
+ required: false,
+ options: 'columns'
+ },
+ {
+ type: 'select',
key: 'controlField',
label: '绂佺敤瀛楁',
initVal: card.controlField || '',
tooltip: '鐢ㄤ簬鎺у埗琛屾暟鎹槸鍚﹀彲閫夋嫨銆傚瓧娈靛�间负true鏃讹紝閫夐」涓嶅彲閫夈��',
required: false,
allowClear: true,
+ joint: true,
options: 'columns'
},
{
@@ -535,6 +673,21 @@
},
{
type: 'radio',
+ key: 'showValue',
+ label: '鏄剧ず鍊�',
+ initVal: card.showValue || 'label',
+ tooltip: '鍗曞厓鏍间笉鍙紪杈戞椂鏄剧ず鐨勪俊鎭��',
+ required: false,
+ options: [{
+ value: 'value',
+ text: '鍊悸峰瓧娈�'
+ }, {
+ value: 'label',
+ text: '鏂囨湰路瀛楁'
+ }]
+ },
+ {
+ type: 'radio',
key: 'dropdown',
label: '涓嬫媺瀹藉害',
initVal: card.dropdown || 'flex',
@@ -549,20 +702,6 @@
},
{
type: 'radio',
- key: 'required',
- label: '蹇呭~',
- initVal: card.required || 'false',
- required: false,
- options: [{
- value: 'false',
- text: '鍚�'
- }, {
- value: 'true',
- text: '鏄�'
- }]
- },
- {
- type: 'radio',
key: 'database',
label: '鏁版嵁搴�',
initVal: card.database || 'local',
@@ -571,7 +710,7 @@
text: '鏈湴'
}, {
value: 'sso',
- text: '绯荤粺'
+ text: '鍗曠偣'
}]
},
{
@@ -579,7 +718,7 @@
key: 'enter',
label: '鍥炶溅鍒囨崲',
initVal: card.enter || '$noAct',
- tooltip: '鍖呮嫭鏂囨湰鎴栨暟鍊煎洖杞︿簨浠躲�佷笅鎷夎彍鍗曢�変腑浜嬩欢銆佸紑鍏冲垏鎹簨浠躲��',
+ tooltip: '鍖呮嫭鏂囨湰鎴栨暟鍊煎洖杞︿簨浠躲�佷笅鎷夎彍鍗曘�侀�夋嫨鍣ㄣ�佹椂闂村彉鍖栦簨浠躲�佸紑鍏冲垏鎹簨浠躲��',
options: editCols
},
{
@@ -599,6 +738,16 @@
initVal: card.ctrlValue || '',
tooltip: '澶氫釜鍊肩敤閫楀彿鍒嗛殧銆�',
required: false
+ },
+ {
+ type: 'select',
+ key: 'clearField',
+ label: '娓呯┖瀛楁',
+ initVal: card.clearField || '',
+ tooltip: '褰撳墠瀛楁缂栬緫鏃堕渶瑕佹竻绌虹殑瀛楁銆�',
+ allowClear: true,
+ required: false,
+ options: fields
},
{
type: 'number',
@@ -698,11 +847,26 @@
options: fields
},
{
+ type: 'checkbox',
+ key: 'evalchars',
+ label: '鏇挎崲瀛楃',
+ initVal: card.evalchars || ['enter', 'space'],
+ tooltip: '鍏紡瑙f瀽鍚庯紝鍙浛鎹㈠洖杞︺�佺┖鏍肩瓑瀛楃锛屽疄鐜版崲琛屻�佸瓧闂磋窛鎺у埗绛夐〉闈㈡晥鏋溿��',
+ required: false,
+ options: [{
+ value: 'enter',
+ text: '鍥炶溅绗�'
+ }, {
+ value: 'space',
+ text: '绌烘牸'
+ }]
+ },
+ {
type: 'radio',
key: 'noValue',
label: '绌哄��',
initVal: card.noValue || 'show',
- tooltip: '褰撳�间负0鏃舵槸鍚︽樉绀�',
+ tooltip: '鏁板�间负 0 鎴栨椂闂村皬浜� 1949-10-02 鏃讹紝鏄惁鏄剧ず',
required: false,
options: [{
value: 'show',
--
Gitblit v1.8.0